Skip to content

Commit

Permalink
Add AtLeast32BitUnsigned for MessageLance::SourceChainBalance (#1207)
Browse files Browse the repository at this point in the history
  • Loading branch information
fewensa committed Nov 11, 2021
1 parent 407bf44 commit 6cd5775
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions relays/messages/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ parking_lot = "0.11.0"
bp-messages = { path = "../../primitives/messages" }
bp-runtime = { path = "../../primitives/runtime" }
relay-utils = { path = "../utils" }

sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "master" }
4 changes: 3 additions & 1 deletion relays/messages/src/message_lane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

use num_traits::{SaturatingAdd, Zero};
use relay_utils::{BlockNumberBase, HeaderId};
use sp_arithmetic::traits::AtLeast32BitUnsigned;
use std::{fmt::Debug, ops::Sub};

/// One-way message lane.
Expand All @@ -40,7 +41,8 @@ pub trait MessageLane: 'static + Clone + Send + Sync {
/// 1) pay transaction fees;
/// 2) pay message delivery and dispatch fee;
/// 3) pay relayer rewards.
type SourceChainBalance: Clone
type SourceChainBalance: AtLeast32BitUnsigned
+ Clone
+ Copy
+ Debug
+ PartialOrd
Expand Down

0 comments on commit 6cd5775

Please sign in to comment.