mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 05:09:22 +00:00
Add content-based deduplication to the tests' shimmed P2P
The tests have recently had their timing stilted, causing failures. The tests are... fine. They're fragile, as obvious, yet they're logical. The simplest fix is to unstilt their timing rather to make them non-fragile. The recent change, which presumably caused said stilting, was the the rebroadcasting added. This de-duplication prevents most of the impact of rebroadcasting. While there's still the async task, and the lock acquisition on attempt to rebroadcast, this hopefully is enough.
This commit is contained in:
@@ -70,7 +70,7 @@ async fn sync_test() {
|
||||
|
||||
// Now that we've confirmed the other tributaries formed a net without issue, drop the syncer's
|
||||
// pending P2P messages
|
||||
syncer_p2p.1.write().await.last_mut().unwrap().clear();
|
||||
syncer_p2p.1.write().await.1.last_mut().unwrap().clear();
|
||||
|
||||
// Have it join the net
|
||||
let syncer_key = Ristretto::generator() * *syncer_key;
|
||||
|
||||
Reference in New Issue
Block a user