aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/rawtransaction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index a3583e7f12..713b0afcdc 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -1255,8 +1255,8 @@ static RPCHelpMan decodepsbt()
}
// Sighash
- if (input.sighash_type > 0) {
- in.pushKV("sighash", SighashToStr((unsigned char)input.sighash_type));
+ if (input.sighash_type != std::nullopt) {
+ in.pushKV("sighash", SighashToStr((unsigned char)*input.sighash_type));
}
// Redeem script and witness script