Merge pull request #3796 from ethcore/tx-broadcast
Avoid broadcasting transactions to peers that send them
This commit is contained in:
@@ -105,13 +105,13 @@ impl SyncProvider for TestSyncProvider {
|
||||
first_seen: 10,
|
||||
propagated_to: map![
|
||||
128.into() => 16
|
||||
]
|
||||
],
|
||||
},
|
||||
5.into() => TransactionStats {
|
||||
first_seen: 16,
|
||||
propagated_to: map![
|
||||
16.into() => 1
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ impl From<SyncTransactionStats> for TransactionStats {
|
||||
propagated_to: s.propagated_to
|
||||
.into_iter()
|
||||
.map(|(id, count)| (id.into(), count))
|
||||
.collect()
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -208,7 +208,7 @@ mod tests {
|
||||
first_seen: 100,
|
||||
propagated_to: map![
|
||||
10.into() => 50
|
||||
]
|
||||
],
|
||||
};
|
||||
|
||||
let serialized = serde_json::to_string(&stats).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user