MCPcopy Create free account
hub / github.com/ElementsProject/elements / RemoveDynaFedMaskOnSerialize

Method RemoveDynaFedMaskOnSerialize

src/chain.h:469–477  ·  view source on GitHub ↗

ELEMENTS: to unmask the dynafed bit on deserialization, we call one of these these methods from SERIALIZE_METHODS, using const-overloading to select the right one. We cannot inline them since the body of SERIALIZE_METHODS will be called with a const object during serialization. See Core #17850 and followups.

Source from the content-addressed store, hash-verified

467 // right one. We cannot inline them since the body of SERIALIZE_METHODS will be
468 // called with a const object during serialization. See Core #17850 and followups.
469 bool RemoveDynaFedMaskOnSerialize(bool for_read) {
470 if (for_read) {
471 bool is_dyna = nVersion < 0;
472 nVersion = (int32_t) (~CBlockHeader::DYNAFED_HF_MASK & (uint32_t)nVersion);
473 return is_dyna;
474 } else {
475 return is_dynafed_block();
476 }
477 }
478 bool RemoveDynaFedMaskOnSerialize(bool for_read) const {
479 assert(!for_read);
480 return is_dynafed_block();

Callers 1

SERIALIZE_METHODSMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected