Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
polkadot-sdk
Commits
f6d374b6
Commit
f6d374b6
authored
1 year ago
by
Serban Iorga
Committed by
Bastian Köcher
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Define generate_grandpa_key_ownership_proof() (#2247) (#2248)
parent
fc0aa382
Branches
gh-readonly-queue/master/pr-4006-1bca825cc27599dfea7b254d0ce00e3c51e632ea
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bridges/relays/client-substrate/Cargo.toml
+1
-0
1 addition, 0 deletions
bridges/relays/client-substrate/Cargo.toml
bridges/relays/client-substrate/src/client.rs
+19
-0
19 additions, 0 deletions
bridges/relays/client-substrate/src/client.rs
with
20 additions
and
0 deletions
bridges/relays/client-substrate/Cargo.toml
+
1
−
0
View file @
f6d374b6
...
...
@@ -39,6 +39,7 @@ pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "ma
sc-chain-spec
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
sc-rpc-api
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
sc-transaction-pool-api
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
sp-consensus-grandpa
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
sp-core
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
sp-rpc
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
sp-runtime
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
...
...
This diff is collapsed.
Click to expand it.
bridges/relays/client-substrate/src/client.rs
+
19
−
0
View file @
f6d374b6
...
...
@@ -52,6 +52,8 @@ use sp_version::RuntimeVersion;
use
std
::
future
::
Future
;
const
SUB_API_GRANDPA_AUTHORITIES
:
&
str
=
"GrandpaApi_grandpa_authorities"
;
const
SUB_API_GRANDPA_GENERATE_KEY_OWNERSHIP_PROOF
:
&
str
=
"GrandpaApi_generate_key_ownership_proof"
;
const
SUB_API_TXPOOL_VALIDATE_TRANSACTION
:
&
str
=
"TaggedTransactionQueue_validate_transaction"
;
const
SUB_API_TX_PAYMENT_QUERY_INFO
:
&
str
=
"TransactionPaymentApi_query_info"
;
const
MAX_SUBSCRIPTION_CAPACITY
:
usize
=
4096
;
...
...
@@ -713,6 +715,23 @@ impl<C: Chain> Client<C> {
Ok
(
Subscription
(
Mutex
::
new
(
receiver
)))
}
// TODO: remove warning after implementing
// https://github.com/paritytech/parity-bridges-common/issues/39
#[allow(dead_code)]
async
fn
generate_grandpa_key_ownership_proof
(
&
self
,
at
:
HashOf
<
C
>
,
set_id
:
sp_consensus_grandpa
::
SetId
,
authority_id
:
sp_consensus_grandpa
::
AuthorityId
,
)
->
Result
<
Option
<
sp_consensus_grandpa
::
OpaqueKeyOwnershipProof
>>
{
self
.typed_state_call
(
SUB_API_GRANDPA_GENERATE_KEY_OWNERSHIP_PROOF
.into
(),
(
set_id
,
authority_id
),
Some
(
at
),
)
.await
}
/// Execute jsonrpsee future in tokio context.
async
fn
jsonrpsee_execute
<
MF
,
F
,
T
>
(
&
self
,
make_jsonrpsee_future
:
MF
)
->
Result
<
T
>
where
...
...
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