Skip to content

Commit

Permalink
Merge pull request #11 from lbryio/roylee17/fix-signrawtransaction
Browse files Browse the repository at this point in the history
rpc: handle "input not found" case in signrawtransaction
  • Loading branch information
roylee17 authored Aug 5, 2022
2 parents eff01c9 + fd92031 commit 3e45c66
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rpc/legacyrpc/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3e45c66

Please sign in to comment.