Skip to content

Commit

Permalink
Allow ShardHeaderInnerV2 in bandwidth scheduler version
Browse files Browse the repository at this point in the history
  • Loading branch information
jancionear committed Oct 28, 2024
1 parent 3a0cec8 commit f85c11f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/primitives/src/sharding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,10 @@ impl ShardChunkHeader {
// In bandwidth scheduler version v3 and v4 are allowed. The first chunk in
// the bandwidth scheduler version will be v3 because the chunk extra for the
// last chunk of previous version doesn't have bandwidth requests.
ShardChunkHeaderInner::V2(_) => {
version >= BLOCK_HEADER_V3_VERSION && version < BANDWIDTH_SCHEDULER_VERSION
}
// v2 is also allowed in the bandwidth scheduler version because there
// are multiple tests which upgrade from an old version directtly to the
// latest version. TODO(#12328) - don't allow InnerV2 in bandwidth scheduler version.
ShardChunkHeaderInner::V2(_) => version >= BLOCK_HEADER_V3_VERSION,
ShardChunkHeaderInner::V3(_) => version >= CONGESTION_CONTROL_VERSION,
ShardChunkHeaderInner::V4(_) => version >= BANDWIDTH_SCHEDULER_VERSION,
},
Expand Down

0 comments on commit f85c11f

Please sign in to comment.