aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2019-10-28 12:54:13 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2019-10-28 12:55:04 +0100
commita25945318fdc2890a141a28843c2c5af251c9605 (patch)
treeb8f6c117be701cdfc9c4576bb6f83d9bac70e7e5
parent9ae468a6d5250c6d55b4879834179ceec1ecc180 (diff)
parentfa398091b7ad683dfd3cd3c2cd030eaf9f336737 (diff)
downloadbitcoin-a25945318fdc2890a141a28843c2c5af251c9605.tar.xz
Merge #17250: Avoid unused call to GuessVerificationProgress in NotifyHeaderTip
fa398091b7ad683dfd3cd3c2cd030eaf9f336737 Avoid unused call to GuessVerificationProgress in NotifyHeaderTip (MarcoFalke) Pull request description: `GuessVerificationProgress` for a header (not a block) is always 0 because the number of txs in the block can not be determined from the header alone. Anyway, this result was never used, so we can optimize this call by hardcoding 0. This is the next commit in a series of changes toward removing nChainTx (see #14863, #13875) ACKs for top commit: promag: Code review ACK fa398091b7ad683dfd3cd3c2cd030eaf9f336737, missed that. laanwj: ACK fa398091b7ad683dfd3cd3c2cd030eaf9f336737 Tree-SHA512: 11016f8dbb1af1cf75241948d1ad35eac0c79d1311cd0db8c6ec806df2a9e3dc5f998dbd66ccbad5d84564e6cec7fe21ce7a2a13c2b34c746e2d3b31aa1db53a
-rw-r--r--src/interfaces/node.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp
index 227ac9f7b9..6577895d50 100644
--- a/src/interfaces/node.cpp
+++ b/src/interfaces/node.cpp
@@ -312,7 +312,7 @@ public:
return MakeHandler(
::uiInterface.NotifyHeaderTip_connect([fn](bool initial_download, const CBlockIndex* block) {
fn(initial_download, block->nHeight, block->GetBlockTime(),
- GuessVerificationProgress(Params().TxData(), block));
+ /* verification progress is unused when a header was received */ 0);
}));
}
InitInterfaces m_interfaces;