witnet-rust
witnet-rust copied to clipboard
feature(data_structures): switch block time when v2.0 activates
This aims to enable switching block time when v2.0 activates. I tested this on a local testnet and it seems to behave properly, but this is obviously a complicated feature.
The most straightforward way to test this feature is probably to add this piece of code in defaults.rs and spin up some nodes:
fn protocol_versions(&self) -> HashMap<ProtocolVersion, (Epoch, u16)> {
// [(ProtocolVersion::V1_7, (0, 45))].into_iter().collect()
[
(ProtocolVersion::V1_7, (0, 45)),
(ProtocolVersion::V1_8, (10, 45)),
(ProtocolVersion::V2_0, (20, 20)),
]
.into_iter()
.collect()
}