Skip to content

Commit

Permalink
lp-gateway: Drop AddAssign
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian committed Aug 1, 2024
1 parent c09ff44 commit 9ac3c61
Showing 1 changed file with 1 addition and 32 deletions.
33 changes: 1 addition & 32 deletions pallets/liquidity-pools-gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ pub mod pallet {
/// https://github.com/centrifuge/centrifuge-chain/pull/1696#discussion_r1456370592
const DEFAULT_WEIGHT_REF_TIME: u64 = 5_000_000_000;

use std::ops::AddAssign;

use super::*;
use crate::RelayerMessageDecodingError::{
MalformedMessage, MalformedSourceAddress, MalformedSourceAddressLength,
Expand Down Expand Up @@ -206,35 +204,6 @@ pub mod pallet {
pub type RelayerList<T: Config> =
StorageDoubleMap<_, Blake2_128Concat, Domain, Blake2_128Concat, DomainAddress, ()>;

//TODO(cdamian): Migration?
// #[pallet::storage]
// #[pallet::getter(fn outbound_message_nonce_store)]
// pub type OutboundMessageNonceStore<T: Config> =
// StorageValue<_, T::OutboundMessageNonce, ValueQuery>;

//TODO(cdamian): Migration?
// /// Storage for outbound messages that will be processed during the
// /// `on_idle` hook.
// #[pallet::storage]
// #[pallet::getter(fn outbound_message_queue)]
// pub type OutboundMessageQueue<T: Config> = StorageMap<
// _,
// Blake2_128Concat,
// T::OutboundMessageNonce,
// (Domain, T::AccountId, T::Message),
// >;

//TODO(cdamian): Migration?
// /// Storage for failed outbound messages that can be manually re-triggered.
// #[pallet::storage]
// #[pallet::getter(fn failed_outbound_messages)]
// pub type FailedOutboundMessages<T: Config> = StorageMap<
// _,
// Blake2_128Concat,
// T::OutboundMessageNonce,
// (Domain, T::AccountId, T::Message, DispatchError),
// >;

/// Stores the hook address of a domain required for particular LP messages.
///
/// Lifetime: Indefinitely.
Expand Down Expand Up @@ -616,7 +585,7 @@ pub mod pallet {
let router_call_weight =
Self::get_outbound_message_processing_weight(router_call_weight);

weight.add_assign(router_call_weight);
*weight = weight.saturating_add(router_call_weight);
}

/// Calculates the weight used by a router when processing an outbound
Expand Down

0 comments on commit 9ac3c61

Please sign in to comment.