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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
056b85df
Commit
056b85df
authored
1 year ago
by
Hugo Trentesaux
Browse files
Options
Downloads
Patches
Plain Diff
build live tests
(but no current network to check them against)
parent
a420bb61
No related branches found
No related tags found
1 merge request
!215
refac membership
Pipeline
#34852
passed
1 year ago
Stage: labels
Stage: quality
Stage: build
Stage: tests
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
live-tests/tests/sanity_gdev.rs
+2
-23
2 additions, 23 deletions
live-tests/tests/sanity_gdev.rs
with
2 additions
and
23 deletions
live-tests/tests/sanity_gdev.rs
+
2
−
23
View file @
056b85df
...
@@ -46,7 +46,7 @@ type IdtyData = gdev::runtime_types::common_runtime::entities::IdtyData;
...
@@ -46,7 +46,7 @@ type IdtyData = gdev::runtime_types::common_runtime::entities::IdtyData;
type
IdtyIndex
=
u32
;
type
IdtyIndex
=
u32
;
type
IdtyValue
=
type
IdtyValue
=
gdev
::
runtime_types
::
pallet_identity
::
types
::
IdtyValue
<
BlockNumber
,
AccountId32
,
IdtyData
>
;
gdev
::
runtime_types
::
pallet_identity
::
types
::
IdtyValue
<
BlockNumber
,
AccountId32
,
IdtyData
>
;
use
gdev
::
runtime_types
::
pallet_identity
::
types
::
IdtyStatus
;
//
use gdev::runtime_types::pallet_identity::types::IdtyStatus;
struct
Storage
{
struct
Storage
{
accounts
:
HashMap
<
AccountId32
,
AccountInfo
>
,
accounts
:
HashMap
<
AccountId32
,
AccountInfo
>
,
...
@@ -110,7 +110,7 @@ async fn sanity_tests_at(client: Client, _maybe_block_hash: Option<H256>) -> any
...
@@ -110,7 +110,7 @@ async fn sanity_tests_at(client: Client, _maybe_block_hash: Option<H256>) -> any
next_creatable_identity_on
:
idty_value
.next_creatable_identity_on
,
next_creatable_identity_on
:
idty_value
.next_creatable_identity_on
,
old_owner_key
:
None
,
// Not used in the live test, skip the conversion
old_owner_key
:
None
,
// Not used in the live test, skip the conversion
owner_key
:
AccountId32
::
from
(
idty_value
.owner_key
.0
),
owner_key
:
AccountId32
::
from
(
idty_value
.owner_key
.0
),
removable_on
:
idty_value
.removable_on
,
next_scheduled
:
idty_value
.next_scheduled
,
status
:
idty_value
.status
,
status
:
idty_value
.status
,
};
};
identities
.insert
(
IdtyIndex
::
from_le_bytes
(
idty_index_bytes
),
idty_val
);
identities
.insert
(
IdtyIndex
::
from_le_bytes
(
idty_index_bytes
),
idty_val
);
...
@@ -275,27 +275,6 @@ mod verifier {
...
@@ -275,27 +275,6 @@ mod verifier {
),
),
);
);
}
}
match
idty_value
.status
{
IdtyStatus
::
Validated
=>
{
// Rule 3: If the identity is validated, removable_on should be zero
self
.assert
(
idty_value
.removable_on
==
0
,
format!
(
"Identity {} is corrupted: removable_on > 0 on validated idty"
,
idty_index
),
);
}
_
=>
{
// Rule 4: If the identity is not validated, next_creatable_identity_on should be zero
self
.assert
(
idty_value
.next_creatable_identity_on
==
0
,
format!
(
"Identity {} is corrupted: next_creatable_identity_on > 0 on non-validated idty"
,
idty_index
)
);
}
}
}
}
for
(
idty_index
,
idty_value
)
in
identities
{
for
(
idty_index
,
idty_value
)
in
identities
{
...
...
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