diff --git a/core/primitives/src/sharding.rs b/core/primitives/src/sharding.rs index 7dfbae62591..226ebb76dc1 100644 --- a/core/primitives/src/sharding.rs +++ b/core/primitives/src/sharding.rs @@ -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, },