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

Fix handle stakinginfo #2165

Merged
merged 3 commits into from
May 16, 2024
Merged

Fix handle stakinginfo #2165

merged 3 commits into from
May 16, 2024

Conversation

hyeonLewis
Copy link
Contributor

@hyeonLewis hyeonLewis commented May 14, 2024

Proposed changes

This PR suggests:

  1. Lower the log level when adding staking info only to cache (after kaia fork)
  2. Make SyncStakingInfo for CNAPI work only before kaia block.
  3. Fix staking info handler to return correct staking info after kaia fork.
  4. Do not schedule staking info after kaia fork.

Although we expect there's no staking info requests since snap sync was disabled, it needs to return correct data. So if the requested staking info is for kaia fork, it returns staking info at previous block.

At downloader, queue still pushes tasks for staking info if it's IsStakingUpdateInterval even after kaia fork. This PR makes it only push task for before kaia fork block. (Eventually, to enable snap sync, the staking info after kaia fork also needs to be fetched. This has been implemented in this PR #2160.)

Types of changes

Please put an x in the boxes related to your change.

  • Bugfix
  • New feature or enhancement
  • Others

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING GUIDELINES doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes ($ make test)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Related issues

  • Please leave the issue numbers or links related to this PR here.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

blukat29
blukat29 previously approved these changes May 15, 2024
@ian0371 ian0371 added the need to merge Need to merge for the next time label May 16, 2024
@ian0371 ian0371 merged commit 81c8a99 into dev May 16, 2024
11 checks passed
@blukat29 blukat29 deleted the fix-handle-stakinginfo branch July 12, 2024 01:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need to merge Need to merge for the next time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants