Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
parity-bridges-common
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
parity-bridges-common
Commits
bfcf4e5f
Commit
bfcf4e5f
authored
4 years ago
by
Hernando Castano
Browse files
Options
Downloads
Patches
Plain Diff
Update message-lane to use new AccountId derivation
parent
2de65a36
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/message-lane/src/instant_payments.rs
+6
-5
6 additions, 5 deletions
modules/message-lane/src/instant_payments.rs
with
6 additions
and
5 deletions
modules/message-lane/src/instant_payments.rs
+
6
−
5
View file @
bfcf4e5f
...
...
@@ -18,8 +18,8 @@
//! All payments are instant.
use
bp_message_lane
::
source_chain
::
MessageDeliveryAndDispatchPayment
;
use
bp_runtime
::{
bridg
e_account_id
,
MESSAGE_LANE_MODULE_PREFIX
,
NO_INSTANCE_ID
};
use
codec
::
Decode
;
use
bp_runtime
::{
deriv
e_account_id
,
SourceAccount
,
NO_INSTANCE_ID
};
use
codec
::
{
Decode
,
Encode
}
;
use
frame_support
::
traits
::{
Currency
as
CurrencyT
,
ExistenceRequirement
};
use
sp_std
::
fmt
::
Debug
;
...
...
@@ -33,7 +33,7 @@ impl<AccountId, Currency> MessageDeliveryAndDispatchPayment<AccountId, Currency:
for
InstantCurrencyPayments
<
AccountId
,
Currency
>
where
Currency
:
CurrencyT
<
AccountId
>
,
AccountId
:
Debug
+
Default
+
Decode
,
AccountId
:
Debug
+
Default
+
Encode
+
Decode
,
{
type
Error
=
&
'static
str
;
...
...
@@ -70,6 +70,7 @@ where
/// Return account id of shared relayers-fund account that is storing all fees
/// paid by submitters, until they're claimed by relayers.
fn
relayers_fund_account
<
AccountId
:
Default
+
Decode
>
()
->
AccountId
{
bridge_account_id
(
NO_INSTANCE_ID
,
MESSAGE_LANE_MODULE_PREFIX
)
fn
relayers_fund_account
<
AccountId
:
Default
+
Encode
+
Decode
>
()
->
AccountId
{
let
encoded_id
=
derive_account_id
::
<
AccountId
>
(
NO_INSTANCE_ID
,
SourceAccount
::
Account
(
AccountId
::
default
()));
AccountId
::
decode
(
&
mut
&
encoded_id
[
..
])
.unwrap_or_default
()
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment