@@ -32,7 +32,9 @@ use near_primitives::types::{
3232 AccountId , Balance , BlockHeight , EpochHeight , EpochId , EpochInfoProvider , Gas , MerkleHash ,
3333 Nonce , NonceIndex , NumShards , ShardId , StateRoot , StateRootNode ,
3434} ;
35- use near_primitives:: version:: { ProtocolFeature , ProtocolVersion } ;
35+ use near_primitives:: version:: {
36+ ProtocolFeature , ProtocolVersion , clamp_to_supported_protocol_version,
37+ } ;
3638use near_primitives:: views:: {
3739 AccessKeyInfoView , CallResult , ContractCodeView , GasKeyNoncesView , QueryRequest , QueryResponse ,
3840 QueryResponseKind , ViewStateResult ,
@@ -1690,7 +1692,7 @@ impl node_runtime::adapter::ViewRuntimeAdapter for NightshadeRuntime {
16901692 self . trie_viewer . view_account_contract_code (
16911693 & state_update,
16921694 account_id,
1693- current_protocol_version,
1695+ clamp_to_supported_protocol_version ( current_protocol_version) ,
16941696 & self . genesis_config . chain_id ,
16951697 )
16961698 }
@@ -1719,7 +1721,7 @@ impl node_runtime::adapter::ViewRuntimeAdapter for NightshadeRuntime {
17191721 epoch_id : * epoch_id,
17201722 epoch_height,
17211723 block_timestamp,
1722- current_protocol_version,
1724+ current_protocol_version : clamp_to_supported_protocol_version ( current_protocol_version ) ,
17231725 cache : Some ( self . compiled_contract_cache . handle ( ) ) ,
17241726 } ;
17251727 self . trie_viewer . call_function (
0 commit comments