| 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 | |
| 125 | class PartiallyDownloadedBlock { |
nothing calls this directly
no test coverage detected