forked from cerc-io/plugeth
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:
co-authored by
Martin Holst Swende
parent
5bed24dd77
commit
c4a662176e
@@ -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++
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user