mirror of
https://git.ghostchain.io/proxmio/ghost-node.git
synced 2025-12-27 11:19:57 +00:00
remove legacy release_delay and add block_distance for maximum block range for the eth_getLogs
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
@@ -31,7 +31,7 @@ fn prepare_network<T: Config>(
|
||||
gatekeeper,
|
||||
topic_name,
|
||||
finality_delay: Some(69),
|
||||
release_delay: Some(69),
|
||||
block_distance: 69,
|
||||
network_type: NetworkType::Evm,
|
||||
incoming_fee: 0,
|
||||
outgoing_fee: 0,
|
||||
@@ -120,16 +120,16 @@ benchmarks! {
|
||||
assert_ne!(GhostNetworks::<T>::networks(chain_id.clone()), prev_network);
|
||||
}
|
||||
|
||||
update_network_release_delay {
|
||||
let delay = Some(1337);
|
||||
update_network_block_distance {
|
||||
let block_distance = 1337;
|
||||
let (chain_id, network) = prepare_network::<T>(1, 1);
|
||||
let authority = T::UpdateOrigin::try_successful_origin()
|
||||
.map_err(|_| BenchmarkError::Weightless)?;
|
||||
let prev_network = create_network::<T>(chain_id.clone(), network.clone())?;
|
||||
}: _<T::RuntimeOrigin>(authority, chain_id.clone(), delay)
|
||||
}: _<T::RuntimeOrigin>(authority, chain_id.clone(), block_distance)
|
||||
verify {
|
||||
assert_last_event::<T>(Event::NetworkReleaseDelayUpdated {
|
||||
chain_id: chain_id.clone(), release_delay: delay,
|
||||
assert_last_event::<T>(Event::NetworkBlockDistanceUpdated {
|
||||
chain_id: chain_id.clone(), block_distance,
|
||||
}.into());
|
||||
assert_ne!(GhostNetworks::<T>::networks(chain_id.clone()), prev_network);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user