Spawn an async test per P2P message to try and resolve latency issues

This commit is contained in:
Luke Parker
2023-08-31 02:35:50 -04:00
parent 3af9dc5d6f
commit 9bf24480f4
3 changed files with 107 additions and 105 deletions

View File

@@ -399,6 +399,8 @@ impl<D: Db, T: TransactionTrait, P: P2p> Network for TendermintNetwork<D, T, P>
hex::encode(hash),
hex::encode(self.genesis)
);
// TODO: Use a notification system for when we have a new provided, in order to minimize
// latency
sleep(Duration::from_secs(Self::block_time().into())).await;
}
_ => return invalid_block(),