Fix insufficient balance when send message. (#1020)

* fix insufficient balance when send message.

* Revert "fix insufficient balance when send message."

This reverts commit b7a539c77b1eb0c6f7ccb1333e9fd2c4e18f8cbc.

* More derived account used for send messages.

* typo fix

* trigger build
This commit is contained in:
kaichao
2021-06-24 23:33:35 +08:00
committed by Bastian Köcher
parent 3e103c16ce
commit 79e7845544
4 changed files with 21 additions and 2 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ the `relays` which are used to pass messages between chains.
│ └── ...
├── relays // Application for sending headers and messages between chains
│ └── ...
└── scripts // Useful development and maintenence scripts
└── scripts // Useful development and maintenance scripts
```
## Running the Bridge
@@ -144,12 +144,21 @@ impl Alternative {
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Alice"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Bob"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Charlie"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Dave"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Eve"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Ferdie"),
)),
],
true,
)
@@ -142,12 +142,21 @@ impl Alternative {
rialto_runtime::Runtime,
pallet_bridge_messages::DefaultInstance,
>::relayer_fund_account_id(),
derive_account_from_millau_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Alice"),
)),
derive_account_from_millau_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Bob"),
)),
derive_account_from_millau_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Charlie"),
)),
derive_account_from_millau_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Dave"),
)),
derive_account_from_millau_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Eve"),
)),
derive_account_from_millau_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Ferdie"),
)),
+2 -1
View File
@@ -310,12 +310,13 @@ impl<T: Config<I>, I: Instance> MessageDispatch<T::AccountId, T::MessageId> for
log::trace!(
target: "runtime::bridge-dispatch",
"Message {:?}/{:?} has been dispatched. Weight: {} of {}. Result: {:?}",
"Message {:?}/{:?} has been dispatched. Weight: {} of {}. Result: {:?}. Call dispatch result: {:?}",
source_chain,
id,
dispatch_result.unspent_weight,
message.weight,
dispatch_result,
result,
);
Self::deposit_event(RawEvent::MessageDispatched(