core, eth: for types with accurate size calcs, return uint64, not float (#26046)

* core, eth: for types with accurate size calcs, return uint64, not float

* core/types: proper tx size tests

* core/types: extend tx size test with decoded sizes, fix error

* core/txpool: fix linter

Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
Péter Szilágyi
2022-10-26 15:23:07 +03:00
committed by GitHub
co-authored by Martin Holst Swende
parent 5bed24dd77
commit c4a662176e
10 changed files with 137 additions and 64 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ func (p *Peer) broadcastTransactions() {
for i := 0; i < len(queue) && size < maxTxPacketSize; i++ {
if tx := p.txpool.Get(queue[i]); tx != nil {
txs = append(txs, tx)
size += tx.Size()
size += common.StorageSize(tx.Size())
}
hashesCount++
}