Fix broadcast for typed tx
This commit is contained in:
parent
a716eb3871
commit
459a1a02a4
BIN
artifacts/openethereum-windows-v3.2.3.zip
Normal file
BIN
artifacts/openethereum-windows-v3.2.3.zip
Normal file
Binary file not shown.
@ -238,15 +238,15 @@ impl SyncPropagator {
|
|||||||
for tx in &transactions {
|
for tx in &transactions {
|
||||||
let hash = tx.hash();
|
let hash = tx.hash();
|
||||||
if to_send.contains(&hash) {
|
if to_send.contains(&hash) {
|
||||||
let appended =
|
tx.rlp_append(&mut packet);
|
||||||
packet.append_raw_checked(&tx.encode(), 1, MAX_TRANSACTION_PACKET_SIZE);
|
pushed += 1;
|
||||||
if !appended {
|
// this is not hard limit and we are okay with it. Max default tx size is 300k.
|
||||||
|
if packet.as_raw().len() >= MAX_TRANSACTION_PACKET_SIZE {
|
||||||
// Maximal packet size reached just proceed with sending
|
// Maximal packet size reached just proceed with sending
|
||||||
debug!(target: "sync", "Transaction packet size limit reached. Sending incomplete set of {}/{} transactions.", pushed, to_send.len());
|
debug!(target: "sync", "Transaction packet size limit reached. Sending incomplete set of {}/{} transactions.", pushed, to_send.len());
|
||||||
to_send = to_send.into_iter().take(pushed).collect();
|
to_send = to_send.into_iter().take(pushed).collect();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pushed += 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
packet.complete_unbounded_list();
|
packet.complete_unbounded_list();
|
||||||
|
Loading…
Reference in New Issue
Block a user