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

Method SERIALIZE_METHODS

src/blockencodings.h:113–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 size_t BlockTxCount() const { return shorttxids.size() + prefilledtxn.size(); }
112
113 SERIALIZE_METHODS(CBlockHeaderAndShortTxIDs, obj)
114 {
115 READWRITE(obj.header, obj.nonce, Using<VectorFormatter<CustomUintFormatter<SHORTTXIDS_LENGTH>>>(obj.shorttxids), obj.prefilledtxn);
116 if (ser_action.ForRead()) {
117 if (obj.BlockTxCount() > std::numeric_limits<uint16_t>::max()) {
118 throw std::ios_base::failure("indexes overflowed 16 bits");
119 }
120 obj.FillShortTxIDSelector();
121 }
122 }
123};
124
125class PartiallyDownloadedBlock {

Callers

nothing calls this directly

Calls 3

BlockTxCountMethod · 0.80
FillShortTxIDSelectorMethod · 0.80
ForReadMethod · 0.45

Tested by

no test coverage detected