witnet-rust icon indicating copy to clipboard operation
witnet-rust copied to clipboard

feature(data_structures): switch block time when v2.0 activates

Open drcpu-github opened this issue 1 year ago • 0 comments

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()
    }

drcpu-github avatar Jun 21 '24 06:06 drcpu-github