Skip to content

Commit 1e10304

Browse files
committed
Merge 7d9dade into merged_master (Elements PR ElementsProject#1256)
2 parents 0b91359 + 7d9dade commit 1e10304

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/chain.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,11 @@ class CBlockIndex
231231
m_signblock_witness = std::nullopt;
232232
}
233233

234-
bool trimmed() const {
234+
inline bool trimmed() const {
235235
return m_trimmed;
236236
}
237237

238-
void assert_untrimmed() const {
238+
inline void assert_untrimmed() const {
239239
assert(!m_trimmed);
240240
}
241241

@@ -244,7 +244,7 @@ class CBlockIndex
244244
return proof.value();
245245
}
246246

247-
const bool dynafed_block() const {
247+
bool is_dynafed_block() const {
248248
if (m_trimmed) {
249249
return m_trimmed_dynafed_block;
250250
}
@@ -454,12 +454,12 @@ class CDiskBlockIndex : public CBlockIndex
454454
nVersion = ~CBlockHeader::DYNAFED_HF_MASK & nVersion;
455455
return is_dyna;
456456
} else {
457-
return !dynafed_params().IsNull();
457+
return is_dynafed_block();
458458
}
459459
}
460460
bool RemoveDynaFedMaskOnSerialize(bool for_read) const {
461461
assert(!for_read);
462-
return !dynafed_params().IsNull();
462+
return is_dynafed_block();
463463
}
464464

465465
SERIALIZE_METHODS(CDiskBlockIndex, obj)
@@ -483,12 +483,12 @@ class CDiskBlockIndex : public CBlockIndex
483483
READWRITE(obj.nVersion);
484484
} else {
485485
int32_t nVersion = obj.nVersion;
486-
if (!obj.dynafed_params().IsNull()) {
486+
if (obj.is_dynafed_block()) {
487487
nVersion |= CBlockHeader::DYNAFED_HF_MASK;
488488
}
489489
READWRITE(nVersion);
490490
}
491-
bool is_dyna = obj.RemoveDynaFedMaskOnSerialize(ser_action.ForRead());;
491+
bool is_dyna = obj.RemoveDynaFedMaskOnSerialize(ser_action.ForRead());
492492

493493
READWRITE(obj.hashPrev);
494494
READWRITE(obj.hashMerkleRoot);

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ bool AppInitParameterInteraction(const ArgsManager& args)
10081008
epoch_length = 20160;
10091009
}
10101010

1011-
if (args.IsArgSet("-trim_headers")) {
1011+
if (args.GetBoolArg("-trim_headers", false)) {
10121012
LogPrintf("Configured for header-trimming mode. This will reduce memory usage substantially, but we will be unable to serve as a full P2P peer, and certain header fields may be missing from JSON RPC output.\n");
10131013
node::fTrimHeaders = true;
10141014
// This calculation is driven by GetValidFedpegScripts in pegins.cpp, which walks the chain

src/rpc/blockchain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ UniValue blockheaderToJSON(const CBlockIndex* tip, const CBlockIndex* blockindex
215215
result.pushKV("difficulty", GetDifficulty(blockindex));
216216
result.pushKV("chainwork", blockindex->nChainWork.GetHex());
217217
} else {
218-
if (!blockindex->dynafed_block()) {
218+
if (!blockindex->is_dynafed_block()) {
219219
if (blockindex->trimmed()) {
220220
result.pushKV("signblock_witness_asm", "<trimmed>");
221221
result.pushKV("signblock_witness_hex", "<trimmed>");

0 commit comments

Comments
 (0)