core: allow transfer amount to be bytes

VM can produce both big.Int and []byte because they
are converted to each other on demand.
This commit is contained in:
Evgenii Stratonikov 2020-03-05 11:51:19 +03:00
parent d03b2ef4a1
commit 3a510b9dad

View file

@ -708,7 +708,11 @@ func (bc *Blockchain) storeBlock(block *block.Block) error {
} }
amount, ok := arr[3].Value().(*big.Int) amount, ok := arr[3].Value().(*big.Int)
if !ok { if !ok {
continue bs, ok := arr[3].Value().([]byte)
if !ok {
continue
}
amount = emit.BytesToInt(bs)
} }
// TODO: #498 // TODO: #498
_, _, _, _ = op, from, to, amount _, _, _, _ = op, from, to, amount