diff options
author | Pieter Wuille <pieter@wuille.net> | 2021-12-01 14:40:25 -0500 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2021-12-02 14:47:17 -0500 |
commit | 2c35a93b3cc19dc71d5664f9f61c24a04f419e35 (patch) | |
tree | 78a40228722d72de583ab39bbc932c186ec5fb39 /src/test/script_tests.cpp | |
parent | 26a1147ce56083d7aa820ac115c16b01e47d911c (diff) |
Generalize/simplify VectorReader into SpanReader
Diffstat (limited to 'src/test/script_tests.cpp')
-rw-r--r-- | src/test/script_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index a89eab68e9..af375f7842 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -1473,7 +1473,7 @@ BOOST_AUTO_TEST_CASE(script_HasValidOps) static CMutableTransaction TxFromHex(const std::string& str) { CMutableTransaction tx; - VectorReader(SER_DISK, SERIALIZE_TRANSACTION_NO_WITNESS, ParseHex(str), 0) >> tx; + SpanReader{SER_DISK, SERIALIZE_TRANSACTION_NO_WITNESS, ParseHex(str), 0} >> tx; return tx; } @@ -1483,7 +1483,7 @@ static std::vector<CTxOut> TxOutsFromJSON(const UniValue& univalue) std::vector<CTxOut> prevouts; for (size_t i = 0; i < univalue.size(); ++i) { CTxOut txout; - VectorReader(SER_DISK, 0, ParseHex(univalue[i].get_str()), 0) >> txout; + SpanReader{SER_DISK, 0, ParseHex(univalue[i].get_str()), 0} >> txout; prevouts.push_back(std::move(txout)); } return prevouts; @@ -1754,7 +1754,7 @@ BOOST_AUTO_TEST_CASE(bip341_keypath_test_vectors) for (const auto& vec : vectors.getValues()) { auto txhex = ParseHex(vec["given"]["rawUnsignedTx"].get_str()); CMutableTransaction tx; - VectorReader(SER_NETWORK, PROTOCOL_VERSION, txhex, 0) >> tx; + SpanReader{SER_NETWORK, PROTOCOL_VERSION, txhex, 0} >> tx; std::vector<CTxOut> utxos; for (const auto& utxo_spent : vec["given"]["utxosSpent"].getValues()) { auto script_bytes = ParseHex(utxo_spent["scriptPubKey"].get_str()); |