Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove without_storage_info for the staking pallet #621

Closed

Conversation

rajesh-nodle
Copy link
Contributor

@rajesh-nodle rajesh-nodle commented Jun 12, 2022

Part of #173

  • Code Re-factor on Sub-functionalities ...

    • Validator :: Done
    • Nominator :: Done
    • Slashing :: Done
    • Hook :: Done
  • Hooks Error Handling needs to be re-visited.

  • Existing Unit

    • 2 test cases are verified, Have to move the remaining.
  • Unit Test code extention

    • Add test cases to verify the new events & error codes :: TODO

Status on Support Ticket raised to Parity

R.Rajeshkumar added 2 commits June 12, 2022 23:06
Signed-off-by: R.Rajeshkumar <rajesh@nodle.com>
Signed-off-by: R.Rajeshkumar <rajesh@nodle.com>
@codecov
Copy link

codecov bot commented Jun 20, 2022

Codecov Report

Merging #621 (4a9a724) into master (6e7d21d) will decrease coverage by 48.92%.
The diff coverage is 22.10%.

@@             Coverage Diff             @@
##           master     #621       +/-   ##
===========================================
- Coverage   89.46%   40.53%   -48.93%     
===========================================
  Files          40       40               
  Lines        6370     2716     -3654     
===========================================
- Hits         5699     1101     -4598     
- Misses        671     1615      +944     
Impacted Files Coverage Δ
pallets/staking/src/tests.rs 100.00% <ø> (+0.08%) ⬆️
pallets/staking/src/lib.rs 30.42% <18.55%> (-55.15%) ⬇️
pallets/staking/src/types.rs 17.79% <20.19%> (-72.16%) ⬇️
pallets/staking/src/slashing.rs 23.31% <20.55%> (-51.52%) ⬇️
pallets/staking/src/hooks.rs 44.05% <20.83%> (-34.52%) ⬇️
pallets/staking/src/set.rs 63.15% <60.37%> (-10.18%) ⬇️
pallets/staking/src/benchmarking.rs 0.00% <0.00%> (-95.60%) ⬇️
pallets/staking/src/migrations.rs 0.00% <0.00%> (-76.36%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e7d21d...4a9a724. Read the comment docs.

"start_session:[{:#?}] - Error, Could be BondedSessions Overflow",
line!()
);
return ();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this return needed here?

.iter()
.take_while(|&&session_idx| session_idx < first_kept)
.count();

for prune_session in bonded.drain(..n_to_prune) {
for prune_session in bonded.to_vec().drain(..n_to_prune) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can't we get an iter from an bounded vec?

@rajesh-nodle
Copy link
Contributor Author

Thanks for comment, pallet-staking is low priority right now. PR is not ready for review. will take up the comment when working on it.

@aliXsed
Copy link
Contributor

aliXsed commented Aug 2, 2022

@rajesh-nodle can you create move the rajesh-nodle:shamb0/bounded_staking to NodleCode/chain:feature/bounded_staking so we keep the changes in that branch but close this PR here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants