Skip to content

Commit

Permalink
core/types: fix and test handling of faulty nil-returning signer
Browse files Browse the repository at this point in the history
  • Loading branch information
ucwong committed Jan 27, 2024
1 parent 9849c6f commit 367684b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/types/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package types
import (
"container/heap"
"errors"
"fmt"
"io"
"math/big"
"sync/atomic"
Expand Down Expand Up @@ -237,6 +238,9 @@ func (tx *Transaction) WithSignature(signer Signer, sig []byte) (*Transaction, e
if err != nil {
return nil, err
}
if r == nil || s == nil || v == nil {
return nil, fmt.Errorf("%w: r: %s, s: %s, v: %s", ErrInvalidSig, r, s, v)
}
cpy := &Transaction{
data: tx.data,
time: tx.time,
Expand Down

0 comments on commit 367684b

Please sign in to comment.