Skip to content

Conversation

@jeffro256
Copy link
Contributor

@jeffro256 jeffro256 commented Oct 13, 2025

Parameter skip_coinbase was always set to true, and didn't actually skip the coinbase transactions. The method broke when set to false.

Noticed by @akildemir.

Parameter `skip_coinbase` was always set to `true`, and didn't actually skip the coinbase transactions. The method broke when set to `false`.

Noticed by @akildemir

current_block.second.reserve(b.tx_hashes.size());
num_txes += b.tx_hashes.size() + (skip_coinbase ? 0 : 1);
num_txes += b.tx_hashes.size() + 1;

Choose a reason for hiding this comment

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

If skip_coinbase was previously true, adding 1 here would change the behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This simply makes the num_txes count more accurate, which makes the limiting check against max_tx_count more accurate as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iamamyth Can you please revisit this review?

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.

3 participants