mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-12 13:43:43 +01:00
Make DecodeBase{32,64} return optional instead of taking bool*
This commit is contained in:
@@ -388,13 +388,12 @@ std::string PSBTRoleName(PSBTRole role) {
|
||||
|
||||
bool DecodeBase64PSBT(PartiallySignedTransaction& psbt, const std::string& base64_tx, std::string& error)
|
||||
{
|
||||
bool invalid;
|
||||
auto tx_data = DecodeBase64(base64_tx, &invalid);
|
||||
if (invalid) {
|
||||
auto tx_data = DecodeBase64(base64_tx);
|
||||
if (!tx_data) {
|
||||
error = "invalid base64";
|
||||
return false;
|
||||
}
|
||||
return DecodeRawPSBT(psbt, MakeByteSpan(tx_data), error);
|
||||
return DecodeRawPSBT(psbt, MakeByteSpan(*tx_data), error);
|
||||
}
|
||||
|
||||
bool DecodeRawPSBT(PartiallySignedTransaction& psbt, Span<const std::byte> tx_data, std::string& error)
|
||||
|
||||
Reference in New Issue
Block a user