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
40ff09b8
Unverified
Commit
40ff09b8
authored
1 year ago
by
yjh
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
pub `keystore_accounts/accounts_from_keys` for offchain Signer (#2051)
parent
a69da4a8
Branches
Branches containing commit
No related merge requests found
Pipeline
#406946
failed with stages
in 1 hour, 38 minutes, and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
substrate/frame/system/src/offchain.rs
+4
-3
4 additions, 3 deletions
substrate/frame/system/src/offchain.rs
with
4 additions
and
3 deletions
substrate/frame/system/src/offchain.rs
+
4
−
3
View file @
40ff09b8
...
...
@@ -154,8 +154,8 @@ impl<T: SigningTypes, C: AppCrypto<T::Public, T::Signature>, X> Signer<T, C, X>
/// all available accounts and the provided accounts
/// in `with_filter`. If no accounts are provided,
/// use all accounts by default.
fn
accounts_from_keys
<
'a
>
(
&
'a
self
)
->
Box
<
dyn
Iterator
<
Item
=
Account
<
T
>>
+
'a
>
{
let
keystore_accounts
=
s
elf
.
keystore_accounts
();
pub
fn
accounts_from_keys
<
'a
>
(
&
'a
self
)
->
Box
<
dyn
Iterator
<
Item
=
Account
<
T
>>
+
'a
>
{
let
keystore_accounts
=
S
elf
::
keystore_accounts
();
match
self
.accounts
{
None
=>
Box
::
new
(
keystore_accounts
),
Some
(
ref
keys
)
=>
{
...
...
@@ -175,7 +175,8 @@ impl<T: SigningTypes, C: AppCrypto<T::Public, T::Signature>, X> Signer<T, C, X>
}
}
fn
keystore_accounts
(
&
self
)
->
impl
Iterator
<
Item
=
Account
<
T
>>
{
/// Return all available accounts in keystore.
pub
fn
keystore_accounts
()
->
impl
Iterator
<
Item
=
Account
<
T
>>
{
C
::
RuntimeAppPublic
::
all
()
.into_iter
()
.enumerate
()
.map
(|(
index
,
key
)|
{
let
generic_public
=
C
::
GenericPublic
::
from
(
key
);
let
public
:
T
::
Public
=
generic_public
.into
();
...
...
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