Skip to content

Commit

Permalink
Take CapMaxGasPrice feature on nightly (#4348)
Browse files Browse the repository at this point in the history
- Actually update nightly protocol version to catch CapMaxGasPrice feature which I forgot to do here: #4308
- Fix tests for `RestoreReceiptsAfterFix` feature started failing after it. Reason: protocol feature have to be set in produced blocks explicitly like in `storage_usage_fix_tests`
  • Loading branch information
Aleksandr Logunov authored Jun 7, 2021
1 parent ffafc01 commit 07b4fd4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions chain/client/tests/process_blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2972,6 +2972,15 @@ mod protocol_feature_restore_receipts_after_fix_tests {
env.clients[0].chain.get_block_by_height(height - 1).unwrap().clone();
set_no_chunk_in_block(&mut block, &prev_block);
}
let validator_signer = InMemoryValidatorSigner::from_seed(
&"test0".to_string(),
KeyType::ED25519,
&"test0".to_string(),
);
block.mut_header().get_mut().inner_rest.latest_protocol_version =
ProtocolFeature::RestoreReceiptsAfterFix.protocol_version();
block.mut_header().resign(&validator_signer);

env.process_block(0, block, Provenance::PRODUCED);

let last_block = env.clients[0].chain.get_block_by_height(height).unwrap().clone();
Expand Down
2 changes: 1 addition & 1 deletion core/primitives/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub const PROTOCOL_VERSION: ProtocolVersion = 45;

/// Current latest nightly version of the protocol.
#[cfg(feature = "nightly_protocol")]
pub const PROTOCOL_VERSION: ProtocolVersion = 112;
pub const PROTOCOL_VERSION: ProtocolVersion = 113;

impl ProtocolFeature {
pub const fn protocol_version(self) -> ProtocolVersion {
Expand Down

0 comments on commit 07b4fd4

Please sign in to comment.