core: ignore non-numeric "amounts" in Transfer events

Refs. #1900.
This commit is contained in:
Roman Khimov 2021-04-12 15:09:37 +03:00
parent 1eebaa8eac
commit 508ad51a86

View file

@ -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)