aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-12-14 10:18:18 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-12-14 10:18:23 +0100
commitc1b7421781b7a53485c6db4a6005a80e32267c9f (patch)
treec6cab5ae1ea5041502b2865f08fe05dd9b147e4c /src
parentec0afbd52b787ac0c8d49ad1b6c9dfa98d725b03 (diff)
parentd6098956c34719cd833a645b21d3d8f1be0a9d17 (diff)
downloadbitcoin-0.12-final.tar.xz
Merge #9211: [0.12 branch] Backportsv0.12-final
d609895 [Wallet] Bugfix: FRT: don't terminate when keypool is empty (Jonas Schnelli) 8dee97f [QA] add fundrawtransaction test on a locked wallet with empty keypool (Jonas Schnelli) 82e29e8 torcontrol: Explicitly request RSA1024 private key (Wladimir J. van der Laan) cca151b Send tip change notification from invalidateblock (Russell Yanofsky) ad99a79 [rpcwallet] Don't use floating point (MarcoFalke)
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp1
-rw-r--r--src/torcontrol.cpp2
-rw-r--r--src/wallet/rpcwallet.cpp6
-rw-r--r--src/wallet/wallet.cpp6
4 files changed, 10 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6dc2b3ba0c..3dd8f34aeb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2999,6 +2999,7 @@ bool InvalidateBlock(CValidationState& state, const Consensus::Params& consensus
InvalidChainFound(pindex);
mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1, STANDARD_LOCKTIME_VERIFY_FLAGS);
+ uiInterface.NotifyBlockTip(IsInitialBlockDownload(), pindex->pprev);
return true;
}
diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp
index 0a68d2348d..6d64be91d5 100644
--- a/src/torcontrol.cpp
+++ b/src/torcontrol.cpp
@@ -465,7 +465,7 @@ void TorController::auth_cb(TorControlConnection& conn, const TorControlReply& r
// Finally - now create the service
if (private_key.empty()) // No private key, generate one
- private_key = "NEW:BEST";
+ private_key = "NEW:RSA1024"; // Explicitly request RSA1024 - see issue #9214
// Request hidden service, redirect port.
// Note that the 'virtual' port doesn't have to be the same as our internal port, but this is just a convenient
// choice. TODO; refactor the shutdown sequence some day.
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 48aa7320f0..67020eb08b 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -595,8 +595,8 @@ UniValue getreceivedbyaddress(const UniValue& params, bool fHelp)
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
CScript scriptPubKey = GetScriptForDestination(address.Get());
- if (!IsMine(*pwalletMain,scriptPubKey))
- return (double)0.0;
+ if (!IsMine(*pwalletMain, scriptPubKey))
+ return ValueFromAmount(0);
// Minimum confirmations
int nMinDepth = 1;
@@ -674,7 +674,7 @@ UniValue getreceivedbyaccount(const UniValue& params, bool fHelp)
}
}
- return (double)nAmount / (double)COIN;
+ return ValueFromAmount(nAmount);
}
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 177edbf2db..30717e89b1 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2104,7 +2104,11 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
CPubKey vchPubKey;
bool ret;
ret = reservekey.GetReservedKey(vchPubKey);
- assert(ret); // should never fail, as we just unlocked
+ if (!ret)
+ {
+ strFailReason = _("Keypool ran out, please call keypoolrefill first");
+ return false;
+ }
scriptChange = GetScriptForDestination(vchPubKey.GetID());
}