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
909bfc2d
Unverified
Commit
909bfc2d
authored
9 months ago
by
Andrei Eres
Committed by
GitHub
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[subsystem-bench] Trigger own assignments in approval-voting (#4772)
parent
a0fc3b54
Branches
gh-readonly-queue/master/pr-3583-02f1f2c47609483be04097e27fc52c06883a6540
Branches containing commit
No related merge requests found
Pipeline
#482306
waiting for manual action with stages
in 1 hour, 18 minutes, and 57 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
polkadot/node/subsystem-bench/src/lib/approval/mod.rs
+8
-1
8 additions, 1 deletion
polkadot/node/subsystem-bench/src/lib/approval/mod.rs
polkadot/node/subsystem-bench/src/lib/mock/runtime_api.rs
+10
-1
10 additions, 1 deletion
polkadot/node/subsystem-bench/src/lib/mock/runtime_api.rs
with
18 additions
and
2 deletions
polkadot/node/subsystem-bench/src/lib/approval/mod.rs
+
8
−
1
View file @
909bfc2d
...
...
@@ -60,7 +60,7 @@ use polkadot_node_subsystem_util::metrics::Metrics;
use
polkadot_overseer
::
Handle
as
OverseerHandleReal
;
use
polkadot_primitives
::{
BlockNumber
,
CandidateEvent
,
CandidateIndex
,
CandidateReceipt
,
Hash
,
Header
,
Slot
,
ValidatorIndex
,
ValidatorIndex
,
ASSIGNMENT_KEY_TYPE_ID
,
};
use
prometheus
::
Registry
;
use
sc_keystore
::
LocalKeystore
;
...
...
@@ -68,6 +68,7 @@ use sc_service::SpawnTaskHandle;
use
serde
::{
Deserialize
,
Serialize
};
use
sp_consensus_babe
::
Epoch
as
BabeEpoch
;
use
sp_core
::
H256
;
use
sp_keystore
::
Keystore
;
use
std
::{
cmp
::
max
,
collections
::{
HashMap
,
HashSet
},
...
...
@@ -785,6 +786,12 @@ fn build_overseer(
let
db
:
polkadot_node_subsystem_util
::
database
::
kvdb_impl
::
DbAdapter
<
kvdb_memorydb
::
InMemory
>
=
polkadot_node_subsystem_util
::
database
::
kvdb_impl
::
DbAdapter
::
new
(
db
,
&
[]);
let
keystore
=
LocalKeystore
::
in_memory
();
keystore
.sr25519_generate_new
(
ASSIGNMENT_KEY_TYPE_ID
,
Some
(
state
.test_authorities.key_seeds
.get
(
NODE_UNDER_TEST
as
usize
)
.unwrap
()
.as_str
()),
)
.unwrap
();
let
system_clock
=
PastSystemClock
::
new
(
SystemClock
{},
state
.delta_tick_from_generated
.clone
());
...
...
This diff is collapsed.
Click to expand it.
polkadot/node/subsystem-bench/src/lib/mock/runtime_api.rs
+
10
−
1
View file @
909bfc2d
...
...
@@ -28,7 +28,7 @@ use polkadot_node_subsystem_types::OverseerSignal;
use
polkadot_primitives
::{
node_features
,
AsyncBackingParams
,
CandidateEvent
,
CandidateReceipt
,
CoreState
,
GroupIndex
,
GroupRotationInfo
,
IndexedVec
,
NodeFeatures
,
OccupiedCore
,
ScheduledCore
,
SessionIndex
,
SessionInfo
,
ValidatorIndex
,
SessionInfo
,
ValidationCode
,
ValidatorIndex
,
};
use
sp_consensus_babe
::
Epoch
as
BabeEpoch
;
use
sp_core
::
H256
;
...
...
@@ -288,6 +288,15 @@ impl MockRuntimeApi {
};
tx
.send
(
Ok
((
groups
,
group_rotation_info
)))
.unwrap
();
},
RuntimeApiMessage
::
Request
(
_parent
,
RuntimeApiRequest
::
ValidationCodeByHash
(
_
,
tx
),
)
=>
{
let
validation_code
=
ValidationCode
(
Vec
::
new
());
if
let
Err
(
err
)
=
tx
.send
(
Ok
(
Some
(
validation_code
)))
{
gum
::
error!
(
target
:
LOG_TARGET
,
?
err
,
"validation code wasn't received"
);
}
},
// Long term TODO: implement more as needed.
message
=>
{
unimplemented!
(
"Unexpected runtime-api message: {:?}"
,
message
)
...
...
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