mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 01:41:03 +00:00
Snowbridge Ethereum Deneb fork preparation (#3029)
- Prepares for the Deneb hardfork on Sepolia testnet on 31 January (needs to be deployed to Rococo before then) - Removes `beacon-minimal-spec` flag for simpler config - Adds test comments --------- Co-authored-by: Ron <yrong1997@gmail.com> Co-authored-by: claravanstaden <Cats 4 life!> Co-authored-by: Alistair Singh <alistair.singh7@gmail.com>
This commit is contained in:
@@ -31,6 +31,7 @@ use parachains_common::{
|
||||
rococo::{consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee},
|
||||
AccountId, AuraId, Balance, SLOT_DURATION,
|
||||
};
|
||||
use snowbridge_core::ChannelId;
|
||||
use sp_consensus_aura::SlotDuration;
|
||||
use sp_core::H160;
|
||||
use sp_keyring::AccountKeyring::Alice;
|
||||
@@ -222,6 +223,72 @@ mod bridge_hub_westend_tests {
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn change_ethereum_nonces_by_governance_works() {
|
||||
let channel_id_one: ChannelId = [1; 32].into();
|
||||
let channel_id_two: ChannelId = [2; 32].into();
|
||||
let nonce = 42;
|
||||
|
||||
// Reset a single inbound channel
|
||||
bridge_hub_test_utils::test_cases::set_storage_keys_by_governance_works::<Runtime>(
|
||||
collator_session_keys(),
|
||||
bp_bridge_hub_rococo::BRIDGE_HUB_ROCOCO_PARACHAIN_ID,
|
||||
Box::new(|call| RuntimeCall::System(call).encode()),
|
||||
vec![
|
||||
(snowbridge_pallet_outbound_queue::Nonce::<Runtime>::hashed_key_for::<ChannelId>(
|
||||
channel_id_one,
|
||||
)
|
||||
.to_vec(), 0u64.encode()),
|
||||
(snowbridge_pallet_inbound_queue::Nonce::<Runtime>::hashed_key_for::<ChannelId>(
|
||||
channel_id_one,
|
||||
)
|
||||
.to_vec(), 0u64.encode()),
|
||||
],
|
||||
|| {
|
||||
// Outbound
|
||||
snowbridge_pallet_outbound_queue::Nonce::<Runtime>::insert::<ChannelId, u64>(
|
||||
channel_id_one,
|
||||
nonce,
|
||||
);
|
||||
snowbridge_pallet_outbound_queue::Nonce::<Runtime>::insert::<ChannelId, u64>(
|
||||
channel_id_two,
|
||||
nonce,
|
||||
);
|
||||
|
||||
// Inbound
|
||||
snowbridge_pallet_inbound_queue::Nonce::<Runtime>::insert::<ChannelId, u64>(
|
||||
channel_id_one,
|
||||
nonce,
|
||||
);
|
||||
snowbridge_pallet_inbound_queue::Nonce::<Runtime>::insert::<ChannelId, u64>(
|
||||
channel_id_two,
|
||||
nonce,
|
||||
);
|
||||
},
|
||||
|| {
|
||||
// Outbound
|
||||
assert_eq!(
|
||||
snowbridge_pallet_outbound_queue::Nonce::<Runtime>::get(channel_id_one),
|
||||
0
|
||||
);
|
||||
assert_eq!(
|
||||
snowbridge_pallet_outbound_queue::Nonce::<Runtime>::get(channel_id_two),
|
||||
nonce
|
||||
);
|
||||
|
||||
// Inbound
|
||||
assert_eq!(
|
||||
snowbridge_pallet_inbound_queue::Nonce::<Runtime>::get(channel_id_one),
|
||||
0
|
||||
);
|
||||
assert_eq!(
|
||||
snowbridge_pallet_inbound_queue::Nonce::<Runtime>::get(channel_id_two),
|
||||
nonce
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn change_delivery_reward_by_governance_works() {
|
||||
bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::<
|
||||
|
||||
Reference in New Issue
Block a user