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

Inconsistency when handling block rewards. #1717

Open
yarkinwho opened this issue Dec 22, 2023 · 0 comments
Open

Inconsistency when handling block rewards. #1717

yarkinwho opened this issue Dec 22, 2023 · 0 comments

Comments

@yarkinwho
Copy link

There some inconsistency when calculating block rewards. e.g. in https://github.com/erigontech/silkworm/blob/29b40fc5c4a8039503b7dd3912ebd8c1efd2202e/silkworm/rpc/commands/erigon_api.cpp#L496C3-L496C3

The reward is only calculated when using ethash: (chain_config.config.count("ethash") != 0)

but in

const auto block_rewards = rule_set_factory->compute_reward(block_with_hash.block);

The reward is computed regardless.

Should the compute_reward function be made a more general way so we can have different block rewards for different rule_set or at least make sure we only count rewards when using ethash?

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

No branches or pull requests

1 participant