diff --git a/rpc/legacyrpc/methods.go b/rpc/legacyrpc/methods.go index ea01fbb..90d3c52 100644 --- a/rpc/legacyrpc/methods.go +++ b/rpc/legacyrpc/methods.go @@ -1861,6 +1861,12 @@ func signRawTransaction(icmd interface{}, w *wallet.Wallet, chainClient *chain.R if err != nil { return nil, err } + if result == nil { + return nil, &btcjson.RPCError{ + Code: btcjson.ErrRPCNoTxInfo, + Message: "Input %s not found" + outPoint.String(), + } + } script, err := hex.DecodeString(result.ScriptPubKey.Hex) if err != nil { return nil, err