move storage keys computation to primitivs (#1254)

This commit is contained in:
Svyatoslav Nikolsky
2021-12-17 13:29:51 +03:00
committed by Bastian Köcher
parent 3aff81a707
commit 22b1e456ab
16 changed files with 240 additions and 123 deletions
@@ -197,7 +197,7 @@ where
Vec::with_capacity(nonces.end().saturating_sub(*nonces.start()) as usize + 1);
let mut message_nonce = *nonces.start();
while message_nonce <= *nonces.end() {
let message_key = pallet_bridge_messages::storage_keys::message_key(
let message_key = bp_messages::storage_keys::message_key(
P::TargetChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
&self.lane_id,
message_nonce,
@@ -206,7 +206,7 @@ where
message_nonce += 1;
}
if proof_parameters.outbound_state_proof_required {
storage_keys.push(pallet_bridge_messages::storage_keys::outbound_lane_data_key(
storage_keys.push(bp_messages::storage_keys::outbound_lane_data_key(
P::TargetChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
&self.lane_id,
));
@@ -190,7 +190,7 @@ where
SubstrateError,
> {
let (id, relayers_state) = self.unrewarded_relayers_state(id).await?;
let inbound_data_key = pallet_bridge_messages::storage_keys::inbound_lane_data_key(
let inbound_data_key = bp_messages::storage_keys::inbound_lane_data_key(
P::SourceChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
&self.lane_id,
);