diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-11-19 14:58:00 +0100 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-11-28 12:42:37 +0100 |
commit | fae76a1f2ac0b352cdd708e6d57f8605bf40112e (patch) | |
tree | 796b195f7feba774f65c72916d8be501dda54b11 /src/test/blockencodings_tests.cpp | |
parent | fac39b56b723f79ba0aa9570708a1d4a600f4e12 (diff) |
scripted-diff: Use DataStream in most places
The remaining places are handled easier outside a scripted-diff.
-BEGIN VERIFY SCRIPT-
sed --regexp-extended -i 's/CDataStream ([0-9a-zA-Z_]+)\(SER_[A-Z]+, [A-Z_]+_VERSION\);/DataStream \1{};/g' $( git grep -l CDataStream)
sed -i 's/, CDataStream/, DataStream/g' src/wallet/walletdb.cpp
-END VERIFY SCRIPT-
Diffstat (limited to 'src/test/blockencodings_tests.cpp')
-rw-r--r-- | src/test/blockencodings_tests.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/blockencodings_tests.cpp b/src/test/blockencodings_tests.cpp index 7968966303..763f0f897e 100644 --- a/src/test/blockencodings_tests.cpp +++ b/src/test/blockencodings_tests.cpp @@ -68,7 +68,7 @@ BOOST_AUTO_TEST_CASE(SimpleRoundTripTest) { CBlockHeaderAndShortTxIDs shortIDs{block}; - CDataStream stream(SER_NETWORK, PROTOCOL_VERSION); + DataStream stream{}; stream << shortIDs; CBlockHeaderAndShortTxIDs shortIDs2; @@ -119,7 +119,7 @@ public: std::vector<PrefilledTransaction> prefilledtxn; explicit TestHeaderAndShortIDs(const CBlockHeaderAndShortTxIDs& orig) { - CDataStream stream(SER_NETWORK, PROTOCOL_VERSION); + DataStream stream{}; stream << orig; stream >> *this; } @@ -127,7 +127,7 @@ public: TestHeaderAndShortIDs(CBlockHeaderAndShortTxIDs{block}) {} uint64_t GetShortID(const uint256& txhash) const { - CDataStream stream(SER_NETWORK, PROTOCOL_VERSION); + DataStream stream{}; stream << *this; CBlockHeaderAndShortTxIDs base; stream >> base; @@ -158,7 +158,7 @@ BOOST_AUTO_TEST_CASE(NonCoinbasePreforwardRTTest) shortIDs.shorttxids[0] = shortIDs.GetShortID(block.vtx[0]->GetHash()); shortIDs.shorttxids[1] = shortIDs.GetShortID(block.vtx[2]->GetHash()); - CDataStream stream(SER_NETWORK, PROTOCOL_VERSION); + DataStream stream{}; stream << shortIDs; CBlockHeaderAndShortTxIDs shortIDs2; @@ -228,7 +228,7 @@ BOOST_AUTO_TEST_CASE(SufficientPreforwardRTTest) shortIDs.shorttxids.resize(1); shortIDs.shorttxids[0] = shortIDs.GetShortID(block.vtx[1]->GetHash()); - CDataStream stream(SER_NETWORK, PROTOCOL_VERSION); + DataStream stream{}; stream << shortIDs; CBlockHeaderAndShortTxIDs shortIDs2; @@ -283,7 +283,7 @@ BOOST_AUTO_TEST_CASE(EmptyBlockRoundTripTest) { CBlockHeaderAndShortTxIDs shortIDs{block}; - CDataStream stream(SER_NETWORK, PROTOCOL_VERSION); + DataStream stream{}; stream << shortIDs; CBlockHeaderAndShortTxIDs shortIDs2; |