Changeset View
Changeset View
Standalone View
Standalone View
src/blockencodings.h
Show First 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | |||||
public: | public: | ||||
CBlockHeader header; | CBlockHeader header; | ||||
// Dummy for deserialization | // Dummy for deserialization | ||||
CBlockHeaderAndShortTxIDs() {} | CBlockHeaderAndShortTxIDs() {} | ||||
CBlockHeaderAndShortTxIDs(const CBlock &block); | CBlockHeaderAndShortTxIDs(const CBlock &block); | ||||
uint64_t GetShortID(const uint256 &txhash) const; | uint64_t GetShortID(const TxHash &txhash) const; | ||||
size_t BlockTxCount() const { | size_t BlockTxCount() const { | ||||
return shorttxids.size() + prefilledtxn.size(); | return shorttxids.size() + prefilledtxn.size(); | ||||
} | } | ||||
ADD_SERIALIZE_METHODS; | ADD_SERIALIZE_METHODS; | ||||
template <typename Stream, typename Operation> | template <typename Stream, typename Operation> | ||||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | public: | ||||
CBlockHeader header; | CBlockHeader header; | ||||
PartiallyDownloadedBlock(const Config &configIn, CTxMemPool *poolIn) | PartiallyDownloadedBlock(const Config &configIn, CTxMemPool *poolIn) | ||||
: pool(poolIn), config(&configIn) {} | : pool(poolIn), config(&configIn) {} | ||||
// extra_txn is a list of extra transactions to look at, in <txhash, | // extra_txn is a list of extra transactions to look at, in <txhash, | ||||
// reference> form. | // reference> form. | ||||
ReadStatus | ReadStatus | ||||
InitData(const CBlockHeaderAndShortTxIDs &cmpctblock, | InitData(const CBlockHeaderAndShortTxIDs &cmpctblock, | ||||
const std::vector<std::pair<uint256, CTransactionRef>> &extra_txn); | const std::vector<std::pair<TxHash, CTransactionRef>> &extra_txn); | ||||
bool IsTxAvailable(size_t index) const; | bool IsTxAvailable(size_t index) const; | ||||
ReadStatus FillBlock(CBlock &block, | ReadStatus FillBlock(CBlock &block, | ||||
const std::vector<CTransactionRef> &vtx_missing); | const std::vector<CTransactionRef> &vtx_missing); | ||||
}; | }; | ||||
#endif // BITCOIN_BLOCKENCODINGS_H | #endif // BITCOIN_BLOCKENCODINGS_H |