Merge pull request #1902 from nspcc-dev/ignore-nonnumeric-values-in-nep17-transfers
core: ignore non-numeric "amounts" in Transfer events
This commit is contained in:
commit
a642bc6bc6
1 changed files with 3 additions and 0 deletions
|
@ -912,6 +912,9 @@ func (bc *Blockchain) handleNotification(note *state.NotificationEvent, d *dao.C
|
|||
if !ok {
|
||||
return
|
||||
}
|
||||
if len(bs) > bigint.MaxBytesLen {
|
||||
return // Not a proper number.
|
||||
}
|
||||
amount = bigint.FromBytes(bs)
|
||||
}
|
||||
bc.processNEP17Transfer(d, h, b, note.ScriptHash, from, to, amount)
|
||||
|
|
Loading…
Reference in a new issue