diff --git a/execution_engine/src/runtime_context/tests.rs b/execution_engine/src/runtime_context/tests.rs index 3bc019bc10..8729f5d52b 100644 --- a/execution_engine/src/runtime_context/tests.rs +++ b/execution_engine/src/runtime_context/tests.rs @@ -17,16 +17,16 @@ use casper_types::{ bytesrepr::ToBytes, execution::TransformKindV2, system::{AUCTION, HANDLE_PAYMENT, MINT, STANDARD_PAYMENT}, - AccessRights, AddressableEntity, AddressableEntityHash, BlockGlobalAddr, BlockTime, - ByteCodeHash, CLValue, ContextAccessRights, EntityAddr, EntityKind, EntryPointType, Gas, Key, - PackageHash, Phase, ProtocolVersion, PublicKey, RuntimeArgs, SecretKey, StoredValue, + AccessRights, AddressableEntity, AddressableEntityHash, BlockGlobalAddr, BlockHash, BlockTime, + ByteCodeHash, CLValue, ContextAccessRights, Digest, EntityAddr, EntityKind, EntryPointType, + Gas, Key, PackageHash, Phase, ProtocolVersion, PublicKey, RuntimeArgs, SecretKey, StoredValue, SystemEntityRegistry, Tagged, Timestamp, TransactionHash, TransactionV1Hash, URef, KEY_HASH_LENGTH, U256, U512, }; use tempfile::TempDir; use super::{CallingAddContractVersion, ExecError, RuntimeContext}; -use crate::engine_state::EngineConfig; +use crate::engine_state::{BlockInfo, EngineConfig}; const TXN_HASH_RAW: [u8; 32] = [1u8; 32]; const PHASE: Phase = Phase::Session; @@ -159,7 +159,12 @@ fn new_runtime_context<'a>( Rc::new(RefCell::new(address_generator)), Rc::new(RefCell::new(tracking_copy)), TEST_ENGINE_CONFIG.clone(), - BlockTime::new(0), + BlockInfo::new( + Digest::default(), + BlockTime::new(0), + BlockHash::default(), + 0, + ), ProtocolVersion::V1_0_0, TransactionHash::V1(TransactionV1Hash::from_raw([1u8; 32])), Phase::Session, @@ -426,7 +431,12 @@ fn contract_key_addable_valid() { Rc::new(RefCell::new(address_generator)), Rc::clone(&tracking_copy), EngineConfig::default(), - BlockTime::new(0), + BlockInfo::new( + Digest::default(), + BlockTime::new(0), + BlockHash::default(), + 0, + ), ProtocolVersion::V1_0_0, TransactionHash::V1(TransactionV1Hash::from_raw(TXN_HASH_RAW)), PHASE, @@ -484,7 +494,12 @@ fn contract_key_addable_invalid() { Rc::new(RefCell::new(address_generator)), Rc::clone(&tracking_copy), EngineConfig::default(), - BlockTime::new(0), + BlockInfo::new( + Digest::default(), + BlockTime::new(0), + BlockHash::default(), + 0, + ), ProtocolVersion::V1_0_0, TransactionHash::V1(TransactionV1Hash::from_raw(TXN_HASH_RAW)), PHASE, diff --git a/node/src/utils/chain_specification.rs b/node/src/utils/chain_specification.rs index 26e860192f..0c567df752 100644 --- a/node/src/utils/chain_specification.rs +++ b/node/src/utils/chain_specification.rs @@ -250,6 +250,7 @@ mod tests { manage_message_topic: HostFunction::new(100, [0, 1, 2, 4]), emit_message: HostFunction::new(100, [0, 1, 2, 3]), cost_increase_per_message: 50, + get_block_info: HostFunction::new(330, [0, 0]), }); static EXPECTED_GENESIS_WASM_COSTS: Lazy = Lazy::new(|| { WasmConfig::new(