mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-13 11:40:42 +02:00
Bugfix: Only warn about an unknown versionbit signal if it's positive
This commit is contained in:
parent
95dbbb86a2
commit
105c907fa4
@ -2763,7 +2763,7 @@ void Chainstate::UpdateTip(const CBlockIndex* pindexNew)
|
|||||||
if ((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) {
|
if ((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) {
|
||||||
for (int bit = 0; bit < VERSIONBITS_NUM_BITS; ++bit) {
|
for (int bit = 0; bit < VERSIONBITS_NUM_BITS; ++bit) {
|
||||||
const int32_t mask = 1 << bit;
|
const int32_t mask = 1 << bit;
|
||||||
if ((nExpectedVersion & mask) != (pindex->nVersion & mask)) {
|
if ((pindex->nVersion & mask) && !(nExpectedVersion & mask)) {
|
||||||
if (++unexpected_bit_count[bit] > WARNING_THRESHOLD) {
|
if (++unexpected_bit_count[bit] > WARNING_THRESHOLD) {
|
||||||
warning_threshold_hit = true;
|
warning_threshold_hit = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user