diff --git a/rpcserver.go b/rpcserver.go index bf3d2f9..2c686b3 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -2041,7 +2041,7 @@ func SignRawTransaction(icmd btcjson.Cmd) (interface{}, *btcjson.Error) { // SigHashSingle inputs can only be signed if there's a // corresponding output. However this could be already signed, // so we always verify the output. - if (hashType & btcscript.SigHashSingle) == 0 || + if (hashType&btcscript.SigHashSingle) == 0 || i < len(msgTx.TxOut) { script, err := btcscript.SignTxOutput(cfg.Net(),