Remove unused GetType() from OverrideStream, CVectorWriter, SpanReader

GetType() is never called, so it is completely unused and can be
removed.
This commit is contained in:
MarcoFalke
2023-09-11 14:58:22 +00:00
parent f01416e23c
commit fa4a9c0f43
11 changed files with 53 additions and 67 deletions

View File

@@ -1470,7 +1470,7 @@ BOOST_AUTO_TEST_CASE(script_HasValidOps)
static CMutableTransaction TxFromHex(const std::string& str)
{
CMutableTransaction tx;
SpanReader{SER_DISK, SERIALIZE_TRANSACTION_NO_WITNESS, ParseHex(str)} >> tx;
SpanReader{SERIALIZE_TRANSACTION_NO_WITNESS, ParseHex(str)} >> tx;
return tx;
}
@@ -1480,7 +1480,7 @@ static std::vector<CTxOut> TxOutsFromJSON(const UniValue& univalue)
std::vector<CTxOut> prevouts;
for (size_t i = 0; i < univalue.size(); ++i) {
CTxOut txout;
SpanReader{SER_DISK, 0, ParseHex(univalue[i].get_str())} >> txout;
SpanReader{0, ParseHex(univalue[i].get_str())} >> txout;
prevouts.push_back(std::move(txout));
}
return prevouts;
@@ -1751,7 +1751,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;
SpanReader{SER_NETWORK, PROTOCOL_VERSION, txhex} >> tx;
SpanReader{PROTOCOL_VERSION, txhex} >> tx;
std::vector<CTxOut> utxos;
for (const auto& utxo_spent : vec["given"]["utxosSpent"].getValues()) {
auto script_bytes = ParseHex(utxo_spent["scriptPubKey"].get_str());