Skip to content

Commit

Permalink
Add RejectBlocksWithOutdatedProtocolVersions to the next shardnet rel…
Browse files Browse the repository at this point in the history
…ease (#7538)

* add feature RejectBlocksWithOutdatedProtocolVersions to the next shardnet release

* address comments
  • Loading branch information
mzhangmzz authored and nikurt committed Nov 9, 2022
1 parent 03b2d44 commit f35421d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions chain/chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ no_cache = ["near-store/no_cache"]
protocol_feature_flat_state = ["near-store/protocol_feature_flat_state"]
protocol_feature_reject_blocks_with_outdated_protocol_version = ["near-primitives/protocol_feature_reject_blocks_with_outdated_protocol_version"]

shardnet = ["protocol_feature_reject_blocks_with_outdated_protocol_version"]

nightly = [
"nightly_protocol",
]
Expand Down
2 changes: 1 addition & 1 deletion core/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ nightly_protocol = []


# Shardnet is the experimental network that we deploy for chunk-only producer testing.
shardnet = []
shardnet = ["protocol_feature_reject_blocks_with_outdated_protocol_version"]

deepsize_feature = [
"deepsize",
Expand Down
8 changes: 7 additions & 1 deletion core/primitives/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,13 @@ impl ProtocolFeature {
#[cfg(feature = "protocol_feature_account_id_in_function_call_permission")]
ProtocolFeature::AccountIdInFunctionCallPermission => 130,
#[cfg(feature = "protocol_feature_reject_blocks_with_outdated_protocol_version")]
ProtocolFeature::RejectBlocksWithOutdatedProtocolVersions => 132,
ProtocolFeature::RejectBlocksWithOutdatedProtocolVersions => {
if cfg!(feature = "shardnet") {
102
} else {
132
}
}
#[cfg(feature = "shardnet")]
ProtocolFeature::ShardnetShardLayoutUpgrade => 102,
}
Expand Down

0 comments on commit f35421d

Please sign in to comment.