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

fix(config): Move on-disk txpool elements to data folder #1287

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

itsdevbear
Copy link
Contributor

@itsdevbear itsdevbear commented Nov 4, 2023

Fix for @BrickBera

image

Summary by CodeRabbit

  • New Features
    • Introduced a default value for the transaction journal in the legacy transaction pool if not provided, enhancing the reliability of the system.
  • Refactor
    • Updated the configuration structure to use the default legacy transaction pool configuration, improving code readability and maintainability.

Copy link

coderabbitai bot commented Nov 4, 2023

Walkthrough

The changes primarily focus on the configuration of the legacy transaction pool in the Cosmos and Ethereum Polar codebases. The updates ensure that the LegacyTxPool.Journal field has a default value if not provided, and the LegacyTxPool field in the Config struct is updated to use the default configuration.

Changes

File Path Summary
cosmos/config/config.go Added a condition to assign a default value to conf.Polar.LegacyTxPool.Journal if it's empty.
eth/polar/config.go Declared legacyPool variable with default configuration, set legacyPool.Journal to an empty string, and updated LegacyTxPool field in the Config struct to use legacyPool.

Poem

🍂 As autumn leaves gently fall,
Code changes we do install.
In the pool of legacy transactions,
We've made some vital expansions.
🐇 Hopping through the code with glee,
Setting defaults for all to see.
As the day turns into night,
Our code now feels just right.
🌕 Under the November moon so bright,
We celebrate our code's new flight! 🎉


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai help to get help.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between cd12ec4 and faadca3.
Files selected for processing (2)
  • cosmos/config/config.go (1 hunks)
  • eth/polar/config.go (1 hunks)
Files skipped from review due to trivial changes (1)
  • cosmos/config/config.go
Additional comments: 1
eth/polar/config.go (1)
  • 51-64: The changes in this hunk are clear and straightforward. The legacyPool variable is declared and assigned legacypool.DefaultConfig. The legacyPool.Journal field is set to an empty string. The LegacyTxPool field in the Config struct is updated to use the legacyPool variable. This ensures that the transaction pool elements are stored in the correct location by default, improving the organization and accessibility of data within the project.

@itsdevbear
Copy link
Contributor Author

@BrickBera please verify

Copy link

codecov bot commented Nov 4, 2023

Codecov Report

Merging #1287 (faadca3) into main (cd12ec4) will decrease coverage by 0.14%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1287      +/-   ##
==========================================
- Coverage   48.61%   48.48%   -0.14%     
==========================================
  Files          84       84              
  Lines        4850     4857       +7     
==========================================
- Hits         2358     2355       -3     
- Misses       2318     2327       +9     
- Partials      174      175       +1     
Files Coverage Δ
cosmos/config/config.go 2.19% <0.00%> (-0.04%) ⬇️

... and 1 file with indirect coverage changes

@itsdevbear itsdevbear merged commit 2c82469 into main Nov 5, 2023
14 checks passed
@itsdevbear itsdevbear deleted the txpool-rlp branch November 5, 2023 19:02
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.

2 participants