get_fee_rate_statistics
should aware block_ext.txs_sizes
length is block_ext.txs_fees
length + 1
#4655
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
backport #4654
What problem does this PR solve?
#4647 didn't do the right fix.
What is changed and how it works?
We should take aware:
ckb/util/types/src/core/extras.rs
Lines 13 to 30 in 44afc93
BlockExt.cycles
's length is equal toBlockExt.txs_fees
's length.BlockExt.cycles
's length + 1 is equal toBlockExt.txs_sizes
's length.Because
BlockTxsVerifier::verify
skipped cellbase transaction:ckb/verification/contextual/src/contextual_block_verifier.rs
Line 455 in 44afc93
But when insert BlockExt, txs_sizes have included cellbase transaction:
ckb/chain/src/verify.rs
Lines 652 to 669 in 44afc93
Related changes
get_fee_rate_statistics
should awareblock_ext.txs_sizes
's length isblock_ext.cycles
's length + 1Check List
Tests
Side effects
Release note