|
|
@ -132,24 +132,7 @@ public:
|
|
|
|
return base.GetShortID(txhash);
|
|
|
|
return base.GetShortID(txhash);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ADD_SERIALIZE_METHODS;
|
|
|
|
SERIALIZE_METHODS(TestHeaderAndShortIDs, obj) { READWRITE(obj.header, obj.nonce, Using<VectorFormatter<CustomUintFormatter<CBlockHeaderAndShortTxIDs::SHORTTXIDS_LENGTH>>>(obj.shorttxids), obj.prefilledtxn); }
|
|
|
|
|
|
|
|
|
|
|
|
template <typename Stream, typename Operation>
|
|
|
|
|
|
|
|
inline void SerializationOp(Stream& s, Operation ser_action) {
|
|
|
|
|
|
|
|
READWRITE(header);
|
|
|
|
|
|
|
|
READWRITE(nonce);
|
|
|
|
|
|
|
|
size_t shorttxids_size = shorttxids.size();
|
|
|
|
|
|
|
|
READWRITE(VARINT(shorttxids_size));
|
|
|
|
|
|
|
|
shorttxids.resize(shorttxids_size);
|
|
|
|
|
|
|
|
for (size_t i = 0; i < shorttxids.size(); i++) {
|
|
|
|
|
|
|
|
uint32_t lsb = shorttxids[i] & 0xffffffff;
|
|
|
|
|
|
|
|
uint16_t msb = (shorttxids[i] >> 32) & 0xffff;
|
|
|
|
|
|
|
|
READWRITE(lsb);
|
|
|
|
|
|
|
|
READWRITE(msb);
|
|
|
|
|
|
|
|
shorttxids[i] = (uint64_t(msb) << 32) | uint64_t(lsb);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
READWRITE(prefilledtxn);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_CASE(NonCoinbasePreforwardRTTest)
|
|
|
|
BOOST_AUTO_TEST_CASE(NonCoinbasePreforwardRTTest)
|
|
|
|