@@ -254,7 +254,7 @@ fn build_script(
254254 let hash_type = if is_type {
255255 ScriptHashType :: Type
256256 } else {
257- ScriptHashType :: Data
257+ ScriptHashType :: Data1
258258 } ;
259259
260260 let script = Script :: new_builder ( )
@@ -492,7 +492,7 @@ pub fn build_always_success_script() -> Script {
492492 let data_hash = CellOutput :: calc_data_hash ( & ALWAYS_SUCCESS ) ;
493493 Script :: new_builder ( )
494494 . code_hash ( data_hash. clone ( ) )
495- . hash_type ( ScriptHashType :: Data . into ( ) )
495+ . hash_type ( ScriptHashType :: Data1 . into ( ) )
496496 . build ( )
497497}
498498
@@ -519,7 +519,7 @@ pub fn build_omni_lock_script(config: &mut TestConfig, args: Bytes) -> Script {
519519 Script :: new_builder ( )
520520 . args ( args. pack ( ) )
521521 . code_hash ( sighash_all_cell_data_hash. clone ( ) )
522- . hash_type ( ScriptHashType :: Data . into ( ) )
522+ . hash_type ( ScriptHashType :: Data1 . into ( ) )
523523 . build ( )
524524}
525525
@@ -560,7 +560,7 @@ pub fn append_input_lock_script_hash(
560560 let script = Script :: new_builder ( )
561561 . args ( Default :: default ( ) )
562562 . code_hash ( hash. clone ( ) )
563- . hash_type ( ScriptHashType :: Data . into ( ) )
563+ . hash_type ( ScriptHashType :: Data1 . into ( ) )
564564 . build ( ) ;
565565 let blake160 = {
566566 let hash = script. calc_script_hash ( ) ;
@@ -995,7 +995,7 @@ pub fn gen_tx_with_grouped_args(
995995 let script = Script :: new_builder ( )
996996 . args ( args. pack ( ) )
997997 . code_hash ( sighash_all_cell_data_hash. clone ( ) )
998- . hash_type ( ScriptHashType :: Data . into ( ) )
998+ . hash_type ( ScriptHashType :: Data1 . into ( ) )
999999 . build ( ) ;
10001000 config. running_script = script. clone ( ) ;
10011001 let previous_output_cell = CellOutput :: new_builder ( )
@@ -2124,7 +2124,18 @@ pub fn verify_tx(
21242124 resolved_tx : ResolvedTransaction ,
21252125 data_loader : DummyDataLoader ,
21262126) -> TransactionScriptsVerifier < DummyDataLoader > {
2127- let hard_fork = HardForks :: new_mirana ( ) ;
2127+ let hard_fork = HardForks {
2128+ ckb2021 : ckb_types:: core:: hardfork:: CKB2021 :: new_mirana ( )
2129+ . as_builder ( )
2130+ . rfc_0032 ( 5 )
2131+ . build ( )
2132+ . unwrap ( ) ,
2133+ ckb2023 : ckb_types:: core:: hardfork:: CKB2023 :: new_mirana ( )
2134+ . as_builder ( )
2135+ . rfc_0049 ( 10 )
2136+ . build ( )
2137+ . unwrap ( ) ,
2138+ } ;
21282139 let consensus = ConsensusBuilder :: default ( )
21292140 . hardfork_switch ( hard_fork)
21302141 . build ( ) ;
@@ -2133,7 +2144,9 @@ pub fn verify_tx(
21332144 data_loader. clone ( ) ,
21342145 Arc :: new ( consensus) ,
21352146 Arc :: new ( TxVerifyEnv :: new_commit (
2136- & HeaderView :: new_advanced_builder ( ) . build ( ) ,
2147+ & HeaderView :: new_advanced_builder ( )
2148+ . epoch ( ckb_types:: core:: EpochNumberWithFraction :: new ( 5 , 0 , 1 ) . pack ( ) )
2149+ . build ( ) ,
21372150 ) ) ,
21382151 )
21392152}
0 commit comments