@@ -13,7 +13,7 @@ pub mod helper;
1313use std:: { collections:: HashMap , sync:: Arc , time:: Instant } ;
1414
1515use std:: { sync:: Arc , time:: Instant } ;
16- use crate :: indexer :: loan_token :: invalidate_block_end ;
16+
1717use ain_dftx:: { deserialize, is_skipped_tx, DfTx , Stack } ;
1818use defichain_rpc:: json:: blockchain:: { Block , Transaction , Vin , VinStandard } ;
1919use helper:: check_if_evm_tx;
@@ -492,7 +492,6 @@ pub fn index_block(services: &Arc<Services>, block: Block<Transaction>) -> Resul
492492 if is_skipped_tx ( & tx. txid ) {
493493 continue ;
494494 }
495-
496495 let start = Instant :: now ( ) ;
497496 let ctx = Context {
498497 block : block_ctx. clone ( ) ,
@@ -553,11 +552,11 @@ pub fn index_block(services: &Arc<Services>, block: Block<Transaction>) -> Resul
553552 median_time : block. mediantime ,
554553 transaction_count,
555554 difficulty : block. difficulty ,
556- masternode : block. masternode ,
557- minter : block. minter ,
555+ masternode : block. masternode . clone ( ) ,
556+ minter : block. minter . clone ( ) ,
558557 minter_block_count : block. minted_blocks ,
559558 stake_modifier : block. stake_modifier . to_owned ( ) ,
560- merkleroot : block. merkleroot ,
559+ merkleroot : block. merkleroot . clone ( ) ,
561560 size : block. size ,
562561 size_stripped : block. strippedsize ,
563562 weight : block. weight ,
@@ -570,11 +569,12 @@ pub fn index_block(services: &Arc<Services>, block: Block<Transaction>) -> Resul
570569 . by_height
571570 . put ( & block_ctx. height , & block_hash) ?;
572571
572+ //index block end
573+ // index_block_end(services, &block)?;
574+
573575 Ok ( ( ) )
574576}
575577
576- pub fn invalidate_block ( services : & Arc < Services > , _block : Block < Transaction > ) -> Result < ( ) > {
577- invalidate_block_end ( services, _block) ?;
578- invalidate_ ( services, _block) ?;
578+ pub fn invalidate_block ( _services : & Arc < Services > , _block : Block < Transaction > ) -> Result < ( ) > {
579579 Ok ( ( ) )
580580}
0 commit comments