Skip to content

Commit 21ee676

Browse files
committed
Merge #17449: fix uninitialized variable nMinerConfirmationWindow
edb6b76 fix uninitialized variable nMinerConfirmationWindow (NullFunctor) Pull request description: It is used for the computation of `BIP9WarningHeight`, and by that time it isn't initialized. ACKs for top commit: jnewbery: utACK edb6b76 promag: ACK edb6b76, commit description could be cleaned up though. MarcoFalke: ACK edb6b76, used python3 to do the addition locally 📍 practicalswift: ACK edb6b76, used `clang++ -O2` on the previous version^W^W^W^W^W^W`bc` to verify the addition locally 🏓 Sjors: Code review ACK edb6b76. Nit: commit description has duplicate text. Tree-SHA512: 6fa0be0ecfbfd5d537f2c5b4a9333c76530c1f3182f777330cc7939b0496e37b75d8f8810cdaf471a9bd3247b425f2e239578300dfa0d5a87cd14a6ccfafa619
2 parents cd6cb97 + edb6b76 commit 21ee676

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/chainparams.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class CMainParams : public CChainParams {
7171
consensus.BIP66Height = 363725; // 00000000000000000379eaa19dce8c9b722d46ae6a57c2f1a988119488b50931
7272
consensus.CSVHeight = 419328; // 000000000000000004a1b34462cb8aeebd5799177f7a29cf28f2d1961716b5b5
7373
consensus.SegwitHeight = 481824; // 0000000000000000001c8018d9cb3b742ef25114f27563e3fc4a1902167f9893
74-
consensus.MinBIP9WarningHeight = consensus.SegwitHeight + consensus.nMinerConfirmationWindow;
74+
consensus.MinBIP9WarningHeight = 483840; // segwit activation height + miner confirmation window
7575
consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
7676
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
7777
consensus.nPowTargetSpacing = 10 * 60;
@@ -178,7 +178,7 @@ class CTestNetParams : public CChainParams {
178178
consensus.BIP66Height = 330776; // 000000002104c8c45e99a8853285a3b592602a3ccde2b832481da85e9e4ba182
179179
consensus.CSVHeight = 770112; // 00000000025e930139bac5c6c31a403776da130831ab85be56578f3fa75369bb
180180
consensus.SegwitHeight = 834624; // 00000000002b980fcd729daaa248fd9316a5200e9b367f4ff2c42453e84201ca
181-
consensus.MinBIP9WarningHeight = consensus.SegwitHeight + consensus.nMinerConfirmationWindow;
181+
consensus.MinBIP9WarningHeight = 836640; // segwit activation height + miner confirmation window
182182
consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
183183
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
184184
consensus.nPowTargetSpacing = 10 * 60;

0 commit comments

Comments
 (0)