Skip to content

Commit

Permalink
fix blacklist nil pointer (#158)
Browse files Browse the repository at this point in the history
Co-authored-by: fletcher.fan <fletcher.fan@bitget.com>
  • Loading branch information
FletcherMan and fletcher.fan authored Oct 28, 2024
1 parent 7136388 commit 1fe0e4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/tx_blacklist.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ func (tb *TxBlacklist) Validate(tx *types.Transaction) bool {
if _, ok := tb.senders[from]; ok {
return false
}
if _, ok := tb.receivers[*tx.To()]; ok {
return false
if tx.To() != nil {
if _, ok := tb.receivers[*tx.To()]; ok {
return false
}
}
return true
}

0 comments on commit 1fe0e4d

Please sign in to comment.