Use DataStream where possible

This commit is contained in:
MarcoFalke
2023-01-03 13:21:44 +01:00
parent fa9becfe1c
commit fa29e73cda
48 changed files with 144 additions and 151 deletions

View File

@@ -29,7 +29,7 @@ CBlockHeaderAndShortTxIDs::CBlockHeaderAndShortTxIDs(const CBlock& block) :
}
void CBlockHeaderAndShortTxIDs::FillShortTxIDSelector() const {
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
DataStream stream{};
stream << header << nonce;
CSHA256 hasher;
hasher.Write((unsigned char*)&(*stream.begin()), stream.end() - stream.begin());