@@ -235,10 +235,7 @@ pub fn apply_entry<'db, 'a>(db: &'db TransactionDB<MultiThreaded>, pk: &[u8], sk
235235 applyenv. exec_track = false ;
236236
237237 let tx_historical_cost = txu. map_get ( crate :: atoms:: tx_historical_cost ( ) ) . unwrap ( ) . decode :: < i128 > ( ) . unwrap ( ) ;
238- let mut exec_cost_total = ( ( tx_historical_cost + ( applyenv. exec_max - applyenv. exec_left ) ) as u64 ) . to_string ( ) ;
239- if applyenv. caller_env . entry_height >= protocol:: FORKHEIGHT {
240- exec_cost_total = ( ( tx_historical_cost + ( applyenv. exec_max - applyenv. exec_left ) + ( applyenv. storage_max - applyenv. storage_left ) ) as u64 ) . to_string ( ) ;
241- }
238+ let exec_cost_total = ( ( tx_historical_cost + ( applyenv. exec_max - applyenv. exec_left ) + ( applyenv. storage_max - applyenv. storage_left ) ) as u64 ) . to_string ( ) ;
242239
243240 match res {
244241 Ok ( result) => {
@@ -464,7 +461,7 @@ fn refund_exec_storage_deposit(applyenv: &mut ApplyEnv) {
464461 }
465462
466463 //Refund remainder of the storage deposit
467- if applyenv . caller_env . entry_height >= protocol :: FORKHEIGHT {
464+ {
468465 let refund = applyenv. storage_left . max ( 0 ) ;
469466 if refund > 0 {
470467 let key = & crate :: bcat ( & [ b"account:" , & applyenv. caller_env . account_origin , b":balance:AMA" ] ) ;
@@ -475,7 +472,6 @@ fn refund_exec_storage_deposit(applyenv: &mut ApplyEnv) {
475472 consensus_kv:: kv_increment ( applyenv, & crate :: bcat ( & [ b"account:" , & applyenv. caller_env . entry_signer , b":balance:AMA" ] ) , cost/2 ) ;
476473 consensus_kv:: kv_increment ( applyenv, & crate :: bcat ( & [ b"account:" , & consensus:: bic:: coin:: BURN_ADDRESS , b":balance:AMA" ] ) , cost/2 ) ;
477474 }
478-
479475 applyenv. muts_final . append ( & mut applyenv. muts ) ;
480476 applyenv. muts_final_rev . append ( & mut applyenv. muts_rev ) ;
481477}
@@ -501,27 +497,11 @@ fn call_txs_pre_upfront_cost<'a>(env: &mut ApplyEnv, txus: &[rustler::Term<'a>])
501497 let action = tx. map_get ( crate :: atoms:: action ( ) ) . unwrap ( ) . decode :: < rustler:: Term < ' a > > ( ) . unwrap ( ) ;
502498 let contract = action. map_get ( crate :: atoms:: contract ( ) ) . unwrap ( ) . decode :: < rustler:: Binary > ( ) . unwrap ( ) . to_vec ( ) ;
503499 let function = action. map_get ( crate :: atoms:: function ( ) ) . unwrap ( ) . decode :: < rustler:: Binary > ( ) . unwrap ( ) . to_vec ( ) ;
504- match ( contract. as_slice ( ) , function. as_slice ( ) ) {
505- //(b"Epoch", b"submit_sol") => {
506- // if env.caller_env.entry_height >= protocol::FORKHEIGHT {
507- // protocol::pay_cost(env, protocol::COST_PER_SOL)
508- // }
509- //},
510- ( b"Contract" , b"deploy" ) => {
511- if env. caller_env . entry_height >= protocol:: FORKHEIGHT {
512- } else {
513- protocol:: pay_cost ( env, protocol:: COST_PER_DEPLOY )
514- }
515- } ,
516- ( _, _) => ( )
517- }
518500
519501 //lock 0.1 AMA during execution
520502 consensus_kv:: kv_increment ( env, & crate :: bcat ( & [ b"account:" , & env. caller_env . account_origin , b":balance:AMA" ] ) , -protocol:: AMA_10_CENT ) ;
521- if env. caller_env . entry_height >= protocol:: FORKHEIGHT {
522- //lock 1.0 storage AMA during execution
523- consensus_kv:: kv_increment ( env, & crate :: bcat ( & [ b"account:" , & env. caller_env . account_origin , b":balance:AMA" ] ) , -protocol:: AMA_1_DOLLAR ) ;
524- }
503+ //lock 1.0 storage AMA during execution
504+ consensus_kv:: kv_increment ( env, & crate :: bcat ( & [ b"account:" , & env. caller_env . account_origin , b":balance:AMA" ] ) , -protocol:: AMA_1_DOLLAR ) ;
525505 }
526506 env. muts_final . append ( & mut env. muts ) ;
527507 env. muts_final_rev . append ( & mut env. muts_rev ) ;
@@ -683,12 +663,8 @@ fn call_bic(env: &mut ApplyEnv, contract: Vec<u8>, function: Vec<u8>, args: Vec<
683663 } ,
684664 ( b"Epoch" , b"slash_trainer" ) => consensus:: bic:: epoch:: call_slash_trainer ( env, args) ,
685665 ( b"Contract" , b"deploy" ) => {
686- if env. caller_env . entry_height >= protocol:: FORKHEIGHT {
687666 consensus_kv:: exec_budget_decr ( env, protocol:: COST_PER_DEPLOY ) ;
688667 consensus:: bic:: contract:: call_deploy ( env, args)
689- } else {
690- consensus:: bic:: contract:: call_deploy ( env, args)
691- }
692668 } ,
693669 //(b"Lockup", b"unlock") => consensus::bic::lockup::call_unlock(env, args),
694670 //(b"LockupPrime", b"lock") => consensus::bic::lockup_prime::call_lock(env, args),
0 commit comments