Correct timing issues

1) Commit didn't include the round, leaving the clock in question.

2) Machines started with a local time, instead of a proper start time.

3) Machines immediately started the next block instead of waiting for 
the block time.
This commit is contained in:
Luke Parker
2022-10-20 00:21:14 -04:00
parent 6b56510da9
commit ff41e9f031
4 changed files with 38 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
use std::sync::Arc;
use std::{sync::Arc, time::SystemTime};
use parity_scale_codec::{Encode, Decode};
@@ -128,7 +128,7 @@ impl TestNetwork {
write.push(TendermintMachine::new(
TestNetwork(i, arc.clone()),
i,
BlockNumber(1),
(BlockNumber(1), SystemTime::now()),
TestBlock { id: 1u32.to_le_bytes(), valid: Ok(()) },
));
}