mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 18:20:58 +02:00
refactor: SpanReader without nVersion
The field is unused, so remove it. This is also required for future commits.
This commit is contained in:
12
src/psbt.h
12
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
|
||||
|
Reference in New Issue
Block a user