refactor: SpanReader without nVersion

The field is unused, so remove it.

This is also required for future commits.
This commit is contained in:
MarcoFalke
2023-11-17 16:32:29 +01:00
parent c252a0fc0f
commit fac39b56b7
9 changed files with 25 additions and 34 deletions

View File

@@ -54,7 +54,7 @@ CMutableTransaction TxFromHex(const std::string& str)
{
CMutableTransaction tx;
try {
SpanReader{0, CheckedParseHex(str)} >> TX_NO_WITNESS(tx);
SpanReader{CheckedParseHex(str)} >> TX_NO_WITNESS(tx);
} catch (const std::ios_base::failure&) {
throw std::runtime_error("Tx deserialization failure");
}
@@ -68,7 +68,7 @@ std::vector<CTxOut> TxOutsFromJSON(const UniValue& univalue)
for (size_t i = 0; i < univalue.size(); ++i) {
CTxOut txout;
try {
SpanReader{0, CheckedParseHex(univalue[i].get_str())} >> txout;
SpanReader{CheckedParseHex(univalue[i].get_str())} >> txout;
} catch (const std::ios_base::failure&) {
throw std::runtime_error("Prevout invalid format");
}