refactor: Drop CDataStream constructors in favor of one taking a Span of bytes

This commit is contained in:
MarcoFalke 2020-11-23 18:53:44 +01:00
parent faa96f841f
commit fa8bdb048e
No known key found for this signature in database
GPG key ID: CE2B75697E69A548
6 changed files with 15 additions and 33 deletions

View file

@ -360,7 +360,7 @@ bool DecodeBase64PSBT(PartiallySignedTransaction& psbt, const std::string& base6
bool DecodeRawPSBT(PartiallySignedTransaction& psbt, const std::string& tx_data, std::string& error)
{
CDataStream ss_data(tx_data.data(), tx_data.data() + tx_data.size(), SER_NETWORK, PROTOCOL_VERSION);
CDataStream ss_data(MakeUCharSpan(tx_data), SER_NETWORK, PROTOCOL_VERSION);
try {
ss_data >> psbt;
if (!ss_data.empty()) {