core: reuse the transfer log buffer

Make it a bit more efficient.
This commit is contained in:
Roman Khimov 2021-11-16 23:11:23 +03:00
parent 125e4231b0
commit f3278ea5b2

View file

@ -1393,7 +1393,8 @@ func appendTokenTransfer(cache dao.DAO, transCache map[util.Uint160]transferData
return err return err
} }
*nextBatch++ *nextBatch++
*log = state.TokenTransferLog{} // Put makes a copy of it anyway.
log.Raw = log.Raw[:0]
} }
transCache[addr] = transferData transCache[addr] = transferData
return nil return nil