Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter v2S
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
nodes
rust
Duniter v2S
Commits
81487fb6
Unverified
Commit
81487fb6
authored
3 months ago
by
bgallois
Browse files
Options
Downloads
Patches
Plain Diff
fix benchmark extrinsic creation
parent
09454c67
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!312
Upgrade polkadot v1.17.0
Pipeline
#39767
passed
3 months ago
Stage: labels
Stage: quality
Stage: build
Stage: tests
Stage: deploy
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
node/src/service/client.rs
+12
-11
12 additions, 11 deletions
node/src/service/client.rs
with
12 additions
and
11 deletions
node/src/service/client.rs
+
12
−
11
View file @
81487fb6
...
@@ -16,8 +16,8 @@
...
@@ -16,8 +16,8 @@
use
common_runtime
::{
AccountId
,
Balance
,
Block
,
BlockNumber
,
Hash
,
Header
,
Index
};
use
common_runtime
::{
AccountId
,
Balance
,
Block
,
BlockNumber
,
Hash
,
Header
,
Index
};
use
sc_client_api
::{
use
sc_client_api
::{
AuxStore
,
Backend
as
BackendT
,
BlockchainEvents
,
KeysIter
,
MerkleValue
,
PairsIter
,
AuxStore
,
Backend
as
BackendT
,
BlockBackend
,
BlockchainEvents
,
KeysIter
,
MerkleValue
,
UsageProvider
,
PairsIter
,
UsageProvider
,
};
};
use
sp_api
::{
CallApiAt
,
ProvideRuntimeApi
};
use
sp_api
::{
CallApiAt
,
ProvideRuntimeApi
};
use
sp_blockchain
::{
HeaderBackend
,
HeaderMetadata
};
use
sp_blockchain
::{
HeaderBackend
,
HeaderMetadata
};
...
@@ -26,7 +26,7 @@ use sp_core::{Encode, Pair};
...
@@ -26,7 +26,7 @@ use sp_core::{Encode, Pair};
use
sp_runtime
::{
use
sp_runtime
::{
generic
::
SignedBlock
,
generic
::
SignedBlock
,
traits
::{
BlakeTwo256
,
Block
as
BlockT
},
traits
::{
BlakeTwo256
,
Block
as
BlockT
},
Justifications
,
Justifications
,
SaturatedConversion
,
};
};
use
sp_storage
::{
ChildInfo
,
StorageData
,
StorageKey
};
use
sp_storage
::{
ChildInfo
,
StorageData
,
StorageKey
};
use
std
::
sync
::
Arc
;
use
std
::
sync
::
Arc
;
...
@@ -385,9 +385,10 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for Client {
...
@@ -385,9 +385,10 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for Client {
let
signer
=
sp_keyring
::
Sr25519Keyring
::
Bob
.pair
();
let
signer
=
sp_keyring
::
Sr25519Keyring
::
Bob
.pair
();
let
period
=
super
::
runtime_executor
::
runtime
::
BlockHashCount
::
get
()
.checked_next_power_of_two
()
.map
(|
c
|
c
/
2
)
.unwrap_or
(
2
)
as
u64
;
let
period
=
super
::
runtime_executor
::
runtime
::
BlockHashCount
::
get
()
.checked_next_power_of_two
()
.map
(|
c
|
c
/
2
)
.unwrap_or
(
2
)
as
u64
;
let
genesis
=
client
.usage_info
()
.chain.best_hash
;
let
genesis
=
client
.block_hash
(
0
)
.ok
()
.flatten
()
.expect
(
"Genesis block exists; qed"
);
let
best_block
=
client
.chain_info
()
.best_number
;
Ok
(
client
.sign_call
(
call
,
nonce
,
0
,
period
,
genesis
,
signer
))
Ok
(
client
.sign_call
(
call
,
nonce
,
best_block
.saturated_into
()
,
period
,
genesis
,
signer
))
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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