Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Dunitrust
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
Operate
Environments
Monitor
Incidents
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nodes
rust
Dunitrust
Commits
e3ae2832
Commit
e3ae2832
authored
6 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
[feat]
#109
parent
098dbf5d
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!99
Resolve "Change protocole : allowing certification replay before expiry (BR_G44.2)"
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/wot/data/mod.rs
+0
-2
0 additions, 2 deletions
lib/wot/data/mod.rs
lib/wot/data/rusty.rs
+0
-2
0 additions, 2 deletions
lib/wot/data/rusty.rs
lib/wot/lib.rs
+0
-8
0 additions, 8 deletions
lib/wot/lib.rs
with
0 additions
and
12 deletions
lib/wot/data/mod.rs
+
0
−
2
View file @
e3ae2832
...
...
@@ -87,8 +87,6 @@ impl<'de> Deserialize<'de> for NodeId {
pub
enum
NewLinkResult
{
/// Certification worked.
Ok
(
usize
),
/// This certification already exist.
AlreadyCertified
(
usize
),
/// All available certifications has been used.
AllCertificationsUsed
(
usize
),
/// Unknown source.
...
...
This diff is collapsed.
Click to expand it.
lib/wot/data/rusty.rs
+
0
−
2
View file @
e3ae2832
...
...
@@ -134,8 +134,6 @@ impl WebOfTrust for RustyWebOfTrust {
NewLinkResult
::
UnknownTarget
()
}
else
if
self
.nodes
[
source
.0
]
.issued_count
>=
self
.max_links
{
NewLinkResult
::
AllCertificationsUsed
(
self
.nodes
[
target
.0
]
.links_source
.len
())
}
else
if
self
.nodes
[
target
.0
]
.links_source
.contains
(
&
source
)
{
NewLinkResult
::
AlreadyCertified
(
self
.nodes
[
target
.0
]
.links_source
.len
())
}
else
{
self
.nodes
[
source
.0
]
.issued_count
+=
1
;
self
.nodes
[
target
.0
]
.links_source
.insert
(
source
);
...
...
This diff is collapsed.
Click to expand it.
lib/wot/lib.rs
+
0
−
8
View file @
e3ae2832
...
...
@@ -196,14 +196,6 @@ mod tests {
// should be able to add some links, cert count is returned
assert_eq!
(
wot
.add_link
(
NodeId
(
2
),
NodeId
(
0
)),
NewLinkResult
::
Ok
(
1
));
assert_eq!
(
wot
.add_link
(
NodeId
(
4
),
NodeId
(
0
)),
NewLinkResult
::
Ok
(
2
));
assert_eq!
(
wot
.add_link
(
NodeId
(
4
),
NodeId
(
0
)),
NewLinkResult
::
AlreadyCertified
(
2
)
);
assert_eq!
(
wot
.add_link
(
NodeId
(
4
),
NodeId
(
0
)),
NewLinkResult
::
AlreadyCertified
(
2
)
);
assert_eq!
(
wot
.add_link
(
NodeId
(
5
),
NodeId
(
0
)),
NewLinkResult
::
Ok
(
3
));
// should exist new links
...
...
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