Relayer rewards improvements (#624)

* Document relayers fund existence and add root account.

* Introduce initialize method instead of assuming that relayer_fund_account is always required.

* cargo fmt --all

* Fix benchmarks.

* cargo fmt --all

* Fix docs for the relayer fund account.
This commit is contained in:
Tomasz Drwięga
2021-01-06 18:15:41 +01:00
committed by Bastian Köcher
parent a30b2cac20
commit 3f7107da10
6 changed files with 100 additions and 54 deletions
+6 -2
View File
@@ -419,6 +419,7 @@ parameter_types! {
bp_millau::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE;
pub const MaxUnconfirmedMessagesAtInboundLane: bp_message_lane::MessageNonce =
bp_rialto::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE;
pub const RootAccountForPayments: Option<AccountId> = None;
}
pub(crate) type WithMillauMessageLaneInstance = pallet_message_lane::DefaultInstance;
@@ -440,8 +441,11 @@ impl pallet_message_lane::Config for Runtime {
type TargetHeaderChain = crate::millau_messages::Millau;
type LaneMessageVerifier = crate::millau_messages::ToMillauMessageVerifier;
type MessageDeliveryAndDispatchPayment =
pallet_message_lane::instant_payments::InstantCurrencyPayments<AccountId, pallet_balances::Module<Runtime>>;
type MessageDeliveryAndDispatchPayment = pallet_message_lane::instant_payments::InstantCurrencyPayments<
Runtime,
pallet_balances::Module<Runtime>,
RootAccountForPayments,
>;
type SourceHeaderChain = crate::millau_messages::Millau;
type MessageDispatch = crate::millau_messages::FromMillauMessageDispatch;