Skip to content

Commit 96e9911

Browse files
committed
use 10_000 and a constant
1 parent 73c7574 commit 96e9911

File tree

7 files changed

+15
-12
lines changed

7 files changed

+15
-12
lines changed

crates/subspace-runtime/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use core::num::NonZeroU64;
3434
use domain_runtime_primitives::opaque::Header as DomainHeader;
3535
use domain_runtime_primitives::{
3636
maximum_domain_block_weight, AccountIdConverter, BlockNumber as DomainNumber,
37-
Hash as DomainHash,
37+
Hash as DomainHash, MAX_OUTGOING_MESSAGES,
3838
};
3939
use frame_support::genesis_builder_helper::{build_state, get_preset};
4040
use frame_support::inherent::ProvideInherent;
@@ -650,7 +650,7 @@ parameter_types! {
650650
pub const ChannelInitReservePortion: Perbill = Perbill::from_percent(20);
651651
// TODO update the fee model
652652
pub const ChannelFeeModel: FeeModel<Balance> = FeeModel{relay_fee: SSC};
653-
pub const MaxOutgoingMessages: u32 = 25;
653+
pub const MaxOutgoingMessages: u32 = MAX_OUTGOING_MESSAGES;
654654
}
655655

656656
// ensure the max outgoing messages is not 0.

domains/primitives/runtime/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ pub type EVMChainId = u64;
7171
/// Dispatch ratio for domains
7272
pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(65);
7373

74+
// Max outgoing messages for XDM
75+
pub const MAX_OUTGOING_MESSAGES: u32 = 10_000;
76+
7477
/// The maximum domain block weight with 3.25 MiB as proof size
7578
/// Consensus allows 3.75 MiB but Fraud proof can carry extra size along with proof size
7679
/// So we set the proof size to 3.25 MiB

domains/runtime/auto-id/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use core::mem;
1717
use domain_runtime_primitives::opaque::Header;
1818
pub use domain_runtime_primitives::{
1919
block_weights, maximum_block_length, opaque, Balance, BlockNumber, Hash, Nonce,
20-
EXISTENTIAL_DEPOSIT,
20+
EXISTENTIAL_DEPOSIT, MAX_OUTGOING_MESSAGES,
2121
};
2222
use domain_runtime_primitives::{
2323
AccountId, Address, CheckExtrinsicsValidityError, DecodeExtrinsicError, HoldIdentifier,
@@ -390,7 +390,7 @@ parameter_types! {
390390
pub const ChannelInitReservePortion: Perbill = Perbill::from_percent(20);
391391
// TODO update the fee model
392392
pub const ChannelFeeModel: FeeModel<Balance> = FeeModel{relay_fee: SSC};
393-
pub const MaxOutgoingMessages: u32 = 25;
393+
pub const MaxOutgoingMessages: u32 = MAX_OUTGOING_MESSAGES;
394394
}
395395

396396
// ensure the max outgoing messages is not 0.

domains/runtime/evm/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub use domain_runtime_primitives::{
2323
};
2424
use domain_runtime_primitives::{
2525
CheckExtrinsicsValidityError, DecodeExtrinsicError, HoldIdentifier, ERR_BALANCE_OVERFLOW,
26-
ERR_NONCE_OVERFLOW, SLOT_DURATION,
26+
ERR_NONCE_OVERFLOW, MAX_OUTGOING_MESSAGES, SLOT_DURATION,
2727
};
2828
use fp_account::EthereumSignature;
2929
use fp_self_contained::{CheckedSignature, SelfContainedCall};
@@ -535,7 +535,7 @@ parameter_types! {
535535
pub const ChannelInitReservePortion: Perbill = Perbill::from_percent(20);
536536
// TODO update the fee model
537537
pub const ChannelFeeModel: FeeModel<Balance> = FeeModel{relay_fee: SSC};
538-
pub const MaxOutgoingMessages: u32 = 25;
538+
pub const MaxOutgoingMessages: u32 = MAX_OUTGOING_MESSAGES;
539539
}
540540

541541
// ensure the max outgoing messages is not 0.

domains/test/runtime/auto-id/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use core::mem;
1717
use domain_runtime_primitives::opaque::Header;
1818
pub use domain_runtime_primitives::{
1919
block_weights, maximum_block_length, opaque, AccountId, Address, Balance, BlockNumber, Hash,
20-
Nonce, Signature, EXISTENTIAL_DEPOSIT,
20+
Nonce, Signature, EXISTENTIAL_DEPOSIT, MAX_OUTGOING_MESSAGES,
2121
};
2222
use domain_runtime_primitives::{
2323
CheckExtrinsicsValidityError, DecodeExtrinsicError, HoldIdentifier, ERR_BALANCE_OVERFLOW,
@@ -389,7 +389,7 @@ parameter_types! {
389389
pub const ChannelInitReservePortion: Perbill = Perbill::from_percent(20);
390390
// TODO update the fee model
391391
pub const ChannelFeeModel: FeeModel<Balance> = FeeModel{relay_fee: SSC};
392-
pub const MaxOutgoingMessages: u32 = 25;
392+
pub const MaxOutgoingMessages: u32 = MAX_OUTGOING_MESSAGES;
393393
}
394394

395395
// ensure the max outgoing messages is not 0.

domains/test/runtime/evm/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use core::mem;
1919
pub use domain_runtime_primitives::opaque::Header;
2020
use domain_runtime_primitives::{
2121
block_weights, maximum_block_length, maximum_domain_block_weight, ERR_BALANCE_OVERFLOW,
22-
ERR_NONCE_OVERFLOW, EXISTENTIAL_DEPOSIT, SLOT_DURATION,
22+
ERR_NONCE_OVERFLOW, EXISTENTIAL_DEPOSIT, MAX_OUTGOING_MESSAGES, SLOT_DURATION,
2323
};
2424
pub use domain_runtime_primitives::{
2525
opaque, Balance, BlockNumber, CheckExtrinsicsValidityError, DecodeExtrinsicError, Hash,
@@ -499,7 +499,7 @@ parameter_types! {
499499
pub const ChannelReserveFee: Balance = SSC;
500500
pub const ChannelInitReservePortion: Perbill = Perbill::from_percent(20);
501501
pub const ChannelFeeModel: FeeModel<Balance> = FeeModel{relay_fee: SSC};
502-
pub const MaxOutgoingMessages: u32 = 25;
502+
pub const MaxOutgoingMessages: u32 = MAX_OUTGOING_MESSAGES;
503503
}
504504

505505
// ensure the max outgoing messages is not 0.

test/subspace-test-runtime/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use core::mem;
4141
use core::num::NonZeroU64;
4242
use domain_runtime_primitives::opaque::Header as DomainHeader;
4343
use domain_runtime_primitives::{
44-
AccountIdConverter, BlockNumber as DomainNumber, Hash as DomainHash,
44+
AccountIdConverter, BlockNumber as DomainNumber, Hash as DomainHash, MAX_OUTGOING_MESSAGES,
4545
};
4646
use frame_support::genesis_builder_helper::{build_state, get_preset};
4747
use frame_support::inherent::ProvideInherent;
@@ -595,7 +595,7 @@ parameter_types! {
595595
pub const ChannelReserveFee: Balance = SSC;
596596
pub const ChannelInitReservePortion: Perbill = Perbill::from_percent(20);
597597
pub const ChannelFeeModel: FeeModel<Balance> = FeeModel{relay_fee: SSC};
598-
pub const MaxOutgoingMessages: u32 = 25;
598+
pub const MaxOutgoingMessages: u32 = MAX_OUTGOING_MESSAGES;
599599
}
600600

601601
// ensure the max outgoing messages is not 0.

0 commit comments

Comments
 (0)