Skip to content

Commit d02efe8

Browse files
committed
Avoid assert flushing to disk with trim_headers enabled
1 parent c87c8ac commit d02efe8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/chain.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,12 +417,12 @@ class CDiskBlockIndex : public CBlockIndex
417417
nVersion = ~CBlockHeader::DYNAFED_HF_MASK & nVersion;
418418
return is_dyna;
419419
} else {
420-
return !dynafed_params().IsNull();
420+
return is_dynafed_block();
421421
}
422422
}
423423
bool RemoveDynaFedMaskOnSerialize(bool for_read) const {
424424
assert(!for_read);
425-
return !dynafed_params().IsNull();
425+
return is_dynafed_block();
426426
}
427427

428428
SERIALIZE_METHODS(CDiskBlockIndex, obj)
@@ -445,7 +445,7 @@ class CDiskBlockIndex : public CBlockIndex
445445
READWRITE(obj.nVersion);
446446
} else {
447447
int32_t nVersion = obj.nVersion;
448-
if (!obj.dynafed_params().IsNull()) {
448+
if (obj.is_dynafed_block()) {
449449
nVersion |= CBlockHeader::DYNAFED_HF_MASK;
450450
}
451451
READWRITE(nVersion);

0 commit comments

Comments
 (0)