Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Major update of PoS unit tests #9193

Merged
merged 6 commits into from
Jan 8, 2024

Conversation

bobanm
Copy link
Contributor

@bobanm bobanm commented Jan 3, 2024

What was the problem?

This PR resolves #8020

How was it solved?

This PR addresses comments from @gkoumout on the following tests.

  • change commission
  • claim rewards
  • stake
  • validator registration
  • unlock

...and adds several further code improvements.

Since this PR is already big, it does NOT address the comments about:

  • report misbehavior
  • endpoint
  • module
  • genesis block

I propose these to be handled in a separate PR.

How was it tested?

All unit tests pass 👌🏻

@bobanm bobanm requested review from shuse2 and gkoumout January 3, 2024 07:57
@bobanm bobanm self-assigned this Jan 3, 2024
Copy link

codecov bot commented Jan 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7fde5ff) 84.66% compared to head (5f3f3dd) 84.68%.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #9193      +/-   ##
===============================================
+ Coverage        84.66%   84.68%   +0.02%     
===============================================
  Files              657      657              
  Lines            24071    24071              
  Branches          3492     3492              
===============================================
+ Hits             20380    20385       +5     
+ Misses            3691     3686       -5     
Files Coverage Δ
framework/src/modules/pos/commands/stake.ts 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

@shuse2 shuse2 requested review from ishantiw and removed request for gkoumout January 3, 2024 13:07
Copy link
Contributor

@ishantiw ishantiw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a minor comment

framework/src/modules/pos/commands/stake.ts Show resolved Hide resolved
@ishantiw ishantiw merged commit 2062593 into development Jan 8, 2024
11 checks passed
@ishantiw ishantiw deleted the 8020-pos-module-unit-test-review branch January 8, 2024 10:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit test review: PoS module (commission, reward)
3 participants