@@ -23,7 +23,7 @@ use std::vec::Vec;
2323
2424use ccore:: {
2525 BlockId , DatabaseClient , EngineClient , EngineInfo , MinerService , MiningBlockChainClient , SignedTransaction ,
26- TermInfo , COL_STATE ,
26+ SnapshotClient , TermInfo , COL_STATE ,
2727} ;
2828use ccrypto:: Blake ;
2929use cjson:: bytes:: Bytes ;
@@ -33,7 +33,7 @@ use csync::BlockSyncEvent;
3333use ctypes:: transaction:: {
3434 Action , AssetMintOutput , AssetOutPoint , AssetTransferInput , AssetTransferOutput , Transaction ,
3535} ;
36- use ctypes:: { Tracker , TxHash } ;
36+ use ctypes:: { BlockHash , Tracker , TxHash } ;
3737use jsonrpc_core:: Result ;
3838use kvdb:: KeyValueDB ;
3939use primitives:: { H160 , H256 } ;
7070
7171impl < C , M > Devel for DevelClient < C , M >
7272where
73- C : DatabaseClient + EngineInfo + EngineClient + MiningBlockChainClient + TermInfo + ' static ,
73+ C : DatabaseClient + EngineInfo + EngineClient + MiningBlockChainClient + TermInfo + SnapshotClient + ' static ,
7474 M : MinerService + ' static ,
7575{
7676 fn get_state_trie_keys ( & self , offset : usize , limit : usize ) -> Result < Vec < H256 > > {
@@ -108,6 +108,11 @@ where
108108 }
109109 }
110110
111+ fn snapshot ( & self , block_hash : BlockHash ) -> Result < ( ) > {
112+ self . client . notify_snapshot ( BlockId :: Hash ( block_hash) ) ;
113+ Ok ( ( ) )
114+ }
115+
111116 fn test_tps ( & self , setting : TPSTestSetting ) -> Result < f64 > {
112117 let common_params = self . client . common_params ( BlockId :: Latest ) . unwrap ( ) ;
113118 let mint_fee = common_params. min_asset_mint_cost ( ) ;
0 commit comments