|
|
@ -75,7 +75,7 @@ func (p *Peer) broadcastTransactions() { |
|
|
|
if done == nil && len(queue) > 0 { |
|
|
|
if done == nil && len(queue) > 0 { |
|
|
|
// Pile transaction until we reach our allowed network limit
|
|
|
|
// Pile transaction until we reach our allowed network limit
|
|
|
|
var ( |
|
|
|
var ( |
|
|
|
hashes []common.Hash |
|
|
|
hashesCount uint64 |
|
|
|
txs []*types.Transaction |
|
|
|
txs []*types.Transaction |
|
|
|
size common.StorageSize |
|
|
|
size common.StorageSize |
|
|
|
) |
|
|
|
) |
|
|
@ -84,9 +84,9 @@ func (p *Peer) broadcastTransactions() { |
|
|
|
txs = append(txs, tx) |
|
|
|
txs = append(txs, tx) |
|
|
|
size += tx.Size() |
|
|
|
size += tx.Size() |
|
|
|
} |
|
|
|
} |
|
|
|
hashes = append(hashes, queue[i]) |
|
|
|
hashesCount++ |
|
|
|
} |
|
|
|
} |
|
|
|
queue = queue[:copy(queue, queue[len(hashes):])] |
|
|
|
queue = queue[:copy(queue, queue[hashesCount:])] |
|
|
|
|
|
|
|
|
|
|
|
// If there's anything available to transfer, fire up an async writer
|
|
|
|
// If there's anything available to transfer, fire up an async writer
|
|
|
|
if len(txs) > 0 { |
|
|
|
if len(txs) > 0 { |
|
|
|