diff options
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r-- | src/wallet.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index f275853528..5f7cddf57e 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1320,7 +1320,10 @@ vector<unsigned char> CReserveKey::GetReservedKey() { CKeyPool keypool; pwallet->ReserveKeyFromKeyPool(nIndex, keypool); - vchPubKey = keypool.vchPubKey; + if (nIndex != -1) + vchPubKey = keypool.vchPubKey; + else + vchPubKey = vchDefaultKey; } assert(!vchPubKey.empty()); return vchPubKey; |