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

fix: format refund logs and update cosmos-sdk #991

Merged
merged 10 commits into from
Jan 5, 2024
Merged

Conversation

j75689
Copy link
Contributor

@j75689 j75689 commented Jan 2, 2024

Description

format refund logs and update cosmos-sdk

Rationale

n/a

Example

n/a

Changes

Notable changes:

  • token

Preflight checks

  • build passed (make build)
  • tests passed (make test)
  • integration tests passed (make integration_test)
  • manual transaction test passed (cli invoke)

Already reviewed by

n/a

Related issues

n/a

@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (ca8aa34) 48.82% compared to head (7c025f9) 48.82%.

Files Patch % Lines
plugins/tokens/plugin.go 0.00% 5 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##           bc-fusion     #991      +/-   ##
=============================================
- Coverage      48.82%   48.82%   -0.01%     
=============================================
  Files            127      127              
  Lines          12800    12802       +2     
=============================================
  Hits            6250     6250              
- Misses          6120     6122       +2     
  Partials         430      430              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

continue
}

logger.Info("succeed to refund swap", "swapId", swapID, "swap", fmt.Sprintf("%+v", swapItem))
swapKeeper.SetLatestProcessedRefundSwapKey(ctx, swapIterator.Key())
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we record the key and update the lasted proceed key outside the loop?

Copy link
Collaborator

Choose a reason for hiding this comment

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

if outside the loop, you will never know the key. will this be heavy in Endblock?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've checked the codes, and found that swap would be gc in the breathe block, so I think this change is unnecessary

https://github.com/bnb-chain/node/blob/13bb81c70a49e55e296ed2b59c680ff9a85db8f5/plugins/tokens/plugin.go#L86C9-L86C9

@j75689 j75689 changed the title fix: format refund logs and skip the processed swap fix: format refund logs and update cosmos-sdk Jan 4, 2024
@unclezoro unclezoro merged commit aca759f into bc-fusion Jan 5, 2024
8 checks passed
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.

4 participants