From f9b10b866eeb28df0f21af379bb5c7cf38ed455c Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Mon, 6 Jul 2020 13:12:55 -0600 Subject: [PATCH] Trivial comment correction. --- src/consensus/funding.cpp | 2 ++ src/consensus/params.cpp | 1 - src/main.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/consensus/funding.cpp b/src/consensus/funding.cpp index 59a2f4632..49aa1a0bf 100644 --- a/src/consensus/funding.cpp +++ b/src/consensus/funding.cpp @@ -44,6 +44,8 @@ std::set GetActiveFundingStreamElements( { std::set> requiredElements; for (int idx = Consensus::FIRST_FUNDING_STREAM; idx < Consensus::MAX_FUNDING_STREAMS; idx++) { + // The following indexed access is safe as Consensus::MAX_FUNDING_STREAMS is used + // in the definition of vFundingStreams. auto fs = params.vFundingStreams[idx]; // Funding period is [startHeight, endHeight) if (fs && nHeight >= fs.get().GetStartHeight() && nHeight < fs.get().GetEndHeight()) { diff --git a/src/consensus/params.cpp b/src/consensus/params.cpp index ee9cc6dac..d4a4adf2d 100644 --- a/src/consensus/params.cpp +++ b/src/consensus/params.cpp @@ -24,7 +24,6 @@ namespace Consensus { // floor((height - SlowStartShift) / PreBlossomHalvingInterval), if not IsBlossomActivated(height) // floor((BlossomActivationHeight - SlowStartShift) / PreBlossomHalvingInterval + (height - BlossomActivationHeight) / PostBlossomHalvingInterval), otherwise if (NetworkUpgradeActive(nHeight, Consensus::UPGRADE_BLOSSOM)) { - int64_t blossomActivationHeight = vUpgrades[Consensus::UPGRADE_BLOSSOM].nActivationHeight; // Ideally we would say: // halvings = (blossomActivationHeight - consensusParams.SubsidySlowStartShift()) / consensusParams.nPreBlossomSubsidyHalvingInterval diff --git a/src/main.cpp b/src/main.cpp index ca9e33626..089fe9d88 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -906,7 +906,7 @@ bool ContextualCheckTransaction( // From Canopy onward, coinbase transaction must include outputs corresponding to the // ZIP 207 consensus funding streams active at the current block height. To avoid // double-decrypting, we detect any shielded funding streams during the Heartwood - // consensus check. If Canopy is not yet active, requiredStreams will be empty. + // consensus check. If Canopy is not yet active, fundingStreamElements will be empty. std::set fundingStreamElements; if (canopyActive) { fundingStreamElements = Consensus::GetActiveFundingStreamElements(