diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-11-17 16:32:29 +0100 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-11-28 12:42:07 +0100 |
commit | fac39b56b723f79ba0aa9570708a1d4a600f4e12 (patch) | |
tree | 7876f1bdcf0be8a9ae7efe0f61b3359db134612d /src/psbt.h | |
parent | c252a0fc0f4dc7d262b971a5e7ff01508159193b (diff) |
refactor: SpanReader without nVersion
The field is unused, so remove it.
This is also required for future commits.
Diffstat (limited to 'src/psbt.h')
-rw-r--r-- | src/psbt.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/psbt.h b/src/psbt.h index ac2d246a27..3f74083717 100644 --- a/src/psbt.h +++ b/src/psbt.h @@ -382,7 +382,7 @@ struct PSBTInput } // Type is compact size uint at beginning of key - SpanReader skey{s.GetVersion(), key}; + SpanReader skey{key}; uint64_t type = ReadCompactSize(skey); // Do stuff based on type @@ -590,7 +590,7 @@ struct PSBTInput } else if (key.size() != 65) { throw std::ios_base::failure("Input Taproot script signature key is not 65 bytes"); } - SpanReader s_key{s.GetVersion(), Span{key}.subspan(1)}; + SpanReader s_key{Span{key}.subspan(1)}; XOnlyPubKey xonly; uint256 hash; s_key >> xonly; @@ -632,7 +632,7 @@ struct PSBTInput } else if (key.size() != 33) { throw std::ios_base::failure("Input Taproot BIP32 keypath key is not at 33 bytes"); } - SpanReader s_key{s.GetVersion(), Span{key}.subspan(1)}; + SpanReader s_key{Span{key}.subspan(1)}; XOnlyPubKey xonly; s_key >> xonly; std::set<uint256> leaf_hashes; @@ -807,7 +807,7 @@ struct PSBTOutput } // Type is compact size uint at beginning of key - SpanReader skey{s.GetVersion(), key}; + SpanReader skey{key}; uint64_t type = ReadCompactSize(skey); // Do stuff based on type @@ -856,7 +856,7 @@ struct PSBTOutput } std::vector<unsigned char> tree_v; s >> tree_v; - SpanReader s_tree{s.GetVersion(), tree_v}; + SpanReader s_tree{tree_v}; if (s_tree.empty()) { throw std::ios_base::failure("Output Taproot tree must not be empty"); } @@ -1060,7 +1060,7 @@ struct PartiallySignedTransaction } // Type is compact size uint at beginning of key - SpanReader skey{s.GetVersion(), key}; + SpanReader skey{key}; uint64_t type = ReadCompactSize(skey); // Do stuff based on type |