Skip to content

Commit 1fe0e4d

Browse files
FletcherManfletcher.fan
and
fletcher.fan
authored
fix blacklist nil pointer (#158)
Co-authored-by: fletcher.fan <[email protected]>
1 parent 7136388 commit 1fe0e4d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/tx_blacklist.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ func (tb *TxBlacklist) Validate(tx *types.Transaction) bool {
9393
if _, ok := tb.senders[from]; ok {
9494
return false
9595
}
96-
if _, ok := tb.receivers[*tx.To()]; ok {
97-
return false
96+
if tx.To() != nil {
97+
if _, ok := tb.receivers[*tx.To()]; ok {
98+
return false
99+
}
98100
}
99101
return true
100102
}

0 commit comments

Comments
 (0)