mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Clarify Arc RwLocks and sleeps in coordinator
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
# Tributary
|
||||
|
||||
A micro-blockchain to provide consensus and ordering to P2P communication.
|
||||
A verifiable, ordered broadcast layer implemented as a BFT micro-blockchain.
|
||||
|
||||
@@ -240,6 +240,9 @@ impl<D: Db, T: Transaction, P: P2p> Network for TendermintNetwork<D, T, P> {
|
||||
type Weights = Arc<Validators>;
|
||||
type Block = TendermintBlock;
|
||||
|
||||
// These are in seconds and create a six-second block time.
|
||||
// The block time is the latency on message delivery (where a message is some piece of data
|
||||
// embedded in a transaction), hence why it should be kept low.
|
||||
const BLOCK_PROCESSING_TIME: u32 = 3;
|
||||
const LATENCY_TIME: u32 = 1;
|
||||
|
||||
@@ -307,7 +310,7 @@ impl<D: Db, T: Transaction, P: P2p> Network for TendermintNetwork<D, T, P> {
|
||||
hex::encode(hash),
|
||||
hex::encode(self.genesis)
|
||||
);
|
||||
sleep(Duration::from_secs(30)).await;
|
||||
sleep(Duration::from_secs(Tendermint::<D, T, P>::block_time())).await;
|
||||
}
|
||||
_ => return invalid_block(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user