mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Fix other bug in initpegoutwallet descriptor parsing
This commit is contained in:
parent
28dac17c4d
commit
55c4c6cd20
2 changed files with 3 additions and 1 deletions
|
|
@ -5018,7 +5018,7 @@ UniValue initpegoutwallet(const JSONRPCRequest& request)
|
|||
|
||||
// Strip off leading key origin
|
||||
if (xpub_str.find("]") != std::string::npos) {
|
||||
xpub_str = xpub_str.substr(xpub_str.find("]"), std::string::npos);
|
||||
xpub_str = xpub_str.substr(xpub_str.find("]")+1, std::string::npos);
|
||||
}
|
||||
|
||||
// Strip off following range
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ class PAKTest (BitcoinTestFramework):
|
|||
|
||||
assert_raises_rpc_error(-8, "bip32_counter must be between 0 and 1,000,000,000, inclusive.", self.nodes[1].initpegoutwallet, xpub, 1000000001)
|
||||
|
||||
# Make sure we can also prepend the key origin to the xpub.
|
||||
self.nodes[1].initpegoutwallet("pkh([deadbeef/44h/0h/0h]"+xpub+"/0/*)")
|
||||
new_init = self.nodes[1].initpegoutwallet(xpub, 2)
|
||||
assert_equal(self.nodes[1].getwalletpakinfo()["bip32_counter"], "2")
|
||||
assert_equal(new_init["address_lookahead"][0], init_results[1]["address_lookahead"][2])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue