Skip to content

Commit

Permalink
Fix:nil pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
shnpd committed Oct 28, 2024
1 parent 1a8e359 commit 6689767
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rpc/legacyrpc/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,9 @@ func signRawTransaction(icmd interface{}, w *wallet.Wallet, chainClient *chain.R
if err != nil {
return nil, err
}
if result == nil {
return nil, errors.New("the utxo has been spent")

Check failure on line 1717 in rpc/legacyrpc/methods.go

View workflow job for this annotation

GitHub Actions / Format, compilation and lint check

do not define dynamic errors, use wrapped static errors instead: "errors.New(\"the utxo has been spent\")" (err113)
}
script, err := hex.DecodeString(result.ScriptPubKey.Hex)
if err != nil {
return nil, err
Expand Down

0 comments on commit 6689767

Please sign in to comment.