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

Blockchain: remove old fee calc logic #9232

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeffro256
Copy link
Contributor

Reduce code and binary size by removing unused code paths related to fee calculations.

@hyc
Copy link
Collaborator

hyc commented Mar 11, 2024

Is it really totally unused, or just unused in the current hardfork version? Do nodes need to use this code when verifying blocks from the earlier part of the blockchain?

@jeffro256
Copy link
Contributor Author

The only location that Blockchain::check_fee() is called is in tx_memory_pool::add_tx(), and only for txs which are not "kept by block" (i.e. only called for ephemeral mempool validation and not for chain validation):

if (!kept_by_block && !m_blockchain.check_fee(tx_weight, fee))

You can verify this yourself with git grep check_fee.

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

Successfully merging this pull request may close these issues.

None yet

4 participants