aboutsummaryrefslogtreecommitdiff
path: root/rpc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rpc.cpp')
-rw-r--r--rpc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpc.cpp b/rpc.cpp
index 9a4757390f..19ec950040 100644
--- a/rpc.cpp
+++ b/rpc.cpp
@@ -275,7 +275,7 @@ Value getnewaddress(const Array& params, bool fHelp)
strLabel = params[0].get_str();
// Generate a new key that is added to wallet
- string strAddress = PubKeyToAddress(GenerateNewKey());
+ string strAddress = PubKeyToAddress(CWalletDB().GetKeyFromKeyPool());
SetAddressBookName(strAddress, strLabel);
return strAddress;