@@ -40,8 +40,8 @@ use crate::checkpoint::{CheckpointId, StateWithCheckpoint};
4040use crate :: error:: Error ;
4141use crate :: traits:: { ShardState , ShardStateView , StateWithCache , TopState , TopStateView } ;
4242use crate :: {
43- Account , ActionData , FindActionHandler , IBCData , Metadata , MetadataAddress , RegularAccount , RegularAccountAddress ,
44- Shard , ShardAddress , ShardLevelState , StateDB , StateResult ,
43+ Account , ActionData , FindActionHandler , IBCData , IBCTransactionExecutor , Metadata , MetadataAddress , RegularAccount ,
44+ RegularAccountAddress , Shard , ShardAddress , ShardLevelState , StateDB , StateResult ,
4545} ;
4646use ccrypto:: BLAKE_NULL_RLP ;
4747use cdb:: { AsHashDB , DatabaseError } ;
@@ -245,7 +245,7 @@ impl TopLevelState {
245245
246246 /// Execute a given tranasction, charging tranasction fee.
247247 /// This will change the state accordingly.
248- pub fn apply < C : ChainTimeInfo + FindActionHandler > (
248+ pub fn apply < C : ChainTimeInfo + FindActionHandler + IBCTransactionExecutor > (
249249 & mut self ,
250250 tx : & Transaction ,
251251 signed_hash : & TxHash ,
@@ -276,7 +276,7 @@ impl TopLevelState {
276276 result
277277 }
278278
279- fn apply_internal < C : ChainTimeInfo + FindActionHandler > (
279+ fn apply_internal < C : ChainTimeInfo + FindActionHandler + IBCTransactionExecutor > (
280280 & mut self ,
281281 tx : & Transaction ,
282282 signed_hash : & TxHash ,
@@ -341,7 +341,7 @@ impl TopLevelState {
341341 }
342342
343343 #[ allow( clippy:: too_many_arguments) ]
344- fn apply_action < C : ChainTimeInfo + FindActionHandler > (
344+ fn apply_action < C : ChainTimeInfo + FindActionHandler + IBCTransactionExecutor > (
345345 & mut self ,
346346 action : & Action ,
347347 network_id : NetworkId ,
@@ -406,9 +406,9 @@ impl TopLevelState {
406406 return Ok ( ( ) )
407407 }
408408 Action :: IBC {
409- ..
409+ bytes ,
410410 } => {
411- // FIXME: call ibc transactions
411+ IBCTransactionExecutor :: execute ( client , bytes , self , fee_payer , signer_public ) ? ;
412412 return Ok ( ( ) )
413413 }
414414 } ;
0 commit comments