File tree Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -406,6 +406,7 @@ pub fn initialize_contract(
406406 } ) ?;
407407 let mut store = Store :: new ( & engine, init_context) ;
408408 let mut linker = Linker :: new ( & engine) ;
409+
409410 // Link in the host interface functions.
410411 link_host_functions ( & mut linker) ?;
411412
@@ -499,6 +500,7 @@ pub fn call_function<'a>(
499500
500501 // Link in the host interface functions.
501502 link_host_functions ( & mut linker) ?;
503+
502504 let instance = linker
503505 . instantiate ( & mut store, & module)
504506 . map_err ( |e| Error :: Wasm ( WasmError :: UnableToLoadModule ( e) ) ) ?;
Original file line number Diff line number Diff line change @@ -827,14 +827,8 @@ fn replay_block(
827827 block_am. weight ( ) ,
828828 true ,
829829 ) {
830- Ok ( ( receipt, _, _) ) => {
831- if receipt. anchored_block_cost != cost {
832- println ! ( "Failed processing block! block = {block_id}. Unexpected cost. expected = {cost}, evaluated = {}" ,
833- receipt. anchored_block_cost) ;
834- process:: exit ( 1 ) ;
835- }
836-
837- info ! ( "Block processed successfully! block = {block_id}" ) ;
830+ Ok ( ( _, _, _) ) => {
831+ info ! ( "Cost check skipped. Block processed successfully! block = {block_id}" ) ;
838832 }
839833 Err ( e) => {
840834 println ! ( "Failed processing block! block = {block_id}, error = {e:?}" ) ;
@@ -1146,15 +1140,6 @@ fn replay_block_nakamoto(
11461140 Err ( e) => ( None , Some ( e) ) ,
11471141 } ;
11481142
1149- if let Some ( receipt) = ok_opt {
1150- // check the cost
1151- let evaluated_cost = receipt. anchored_block_cost . clone ( ) ;
1152- if evaluated_cost != expected_cost {
1153- println ! ( "Failed processing block! block = {block_id}. Unexpected cost. expected = {expected_cost}, evaluated = {evaluated_cost}" ) ;
1154- process:: exit ( 1 ) ;
1155- }
1156- }
1157-
11581143 if let Some ( e) = err_opt {
11591144 // force rollback
11601145 drop ( chainstate_tx) ;
You can’t perform that action at this time.
0 commit comments