Skip to content

Commit c00da34

Browse files
committed
Merge c7ee0ac into merged_master (Elements PR #803)
2 parents 8bbbb28 + c7ee0ac commit c00da34

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/wallet/rpcdump.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,8 +1531,11 @@ UniValue getwalletpakinfo(const JSONRPCRequest& request)
15311531
ret.pushKV("liquid_pak", HexStr(pwallet->online_key));
15321532
ret.pushKV("liquid_pak_address", EncodeDestination(PKHash(pwallet->online_key)));
15331533

1534+
// We know that the number is non-negative from earlier check
1535+
unsigned int counter = (unsigned int)pwallet->offline_counter;
1536+
15341537
UniValue address_list(UniValue::VARR);
1535-
for (unsigned int i = 0; i < 3; i++) {
1538+
for (unsigned int i = counter; i < counter+3; i++) {
15361539
std::vector<CScript> scripts;
15371540
if (!desc->Expand(i, provider, scripts, provider)) {
15381541
throw JSONRPCError(RPC_WALLET_ERROR, "Could not generate lookahead addresses with descriptor. This is a bug.");

0 commit comments

Comments
 (0)