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
0deb8be5
Commit
0deb8be5
authored
4 months ago
by
Cédric Moreau
Committed by
Cédric Moreau
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
test: unclaimed UDs out of UD reeval window
parent
0f671ac6
No related branches found
No related tags found
1 merge request
!301
Resolve "[test] UD out of reeval window"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pallets/universal-dividend/src/compute_claim_uds.rs
+15
-0
15 additions, 0 deletions
pallets/universal-dividend/src/compute_claim_uds.rs
with
15 additions
and
0 deletions
pallets/universal-dividend/src/compute_claim_uds.rs
+
15
−
0
View file @
0deb8be5
...
...
@@ -109,4 +109,19 @@ mod tests {
(
2
,
110_000
)
);
}
#[test]
fn
very_old_unclaimed_ud_out_of_reevals
()
{
let
past_reevals
=
vec!
[
// (3, 100 as Balance), "old" reeval which has gone out of reevals window.
(
4
,
1_000
as
Balance
),
(
5
,
10_000
as
Balance
),
(
6
,
100_000
as
Balance
),
];
// All the UDs out of the reeval window must produce 0 money units
assert_eq!
(
compute_claim_uds
(
7
,
1
,
past_reevals
.into_iter
()),
(
3
,
111_000
)
);
}
}
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