diff --git a/plugins/ibc_plugin/ibc_plugin.cpp b/plugins/ibc_plugin/ibc_plugin.cpp index ff8a88778..8988c5c5f 100644 --- a/plugins/ibc_plugin/ibc_plugin.cpp +++ b/plugins/ibc_plugin/ibc_plugin.cpp @@ -1317,7 +1317,7 @@ namespace eosio { namespace ibc { par.table = N(hubtrxs); par.table_key = "id"; par.lower_bound = to_string(id); - par.upper_bound = ""; + par.upper_bound = ""; // to last par.limit = 1; par.key_type = "i64"; par.index_position = "1"; @@ -4217,9 +4217,9 @@ namespace eosio { namespace ibc { } auto range = token_contract->get_table_hubtrxs_id_range(); - if ( range == range_type() ){ + /*if ( range == range_type() ){ return; - } + }*/ //ilog("hub step 2"); /// --- hub_trx_table --- @@ -4228,11 +4228,11 @@ namespace eosio { namespace ibc { while(1) { - /// idump((next_index)); auto hub_trx_opt = token_contract->get_table_hubtrxs_info_by_lower_id( next_index ); if ( hub_trx_opt.valid() ){ - hub_trx_table.emplace_back( *hub_trx_opt ); - next_index = hub_trx_opt->cash_seq_num + 1; + idump((next_index)); + hub_trx_table.push_back( *hub_trx_opt ); + next_index = hub_trx_opt->id + 1; } else { break; } @@ -4243,7 +4243,8 @@ namespace eosio { namespace ibc { std::vector need_transfers; for( const auto& hub_trx : hub_trx_table ){ - if ( hub_trx.hub_trx_id != transaction_id_type() ){ + //if ( hub_trx.hub_trx_id != transaction_id_type() ){ + if ( hub_trx.hub_trx_time_slot != 0 ){ continue; } @@ -4265,7 +4266,7 @@ namespace eosio { namespace ibc { continue; } - need_transfers.emplace_back( par ); + need_transfers.push_back( par ); } //ilog("hub step 4"); diff --git a/plugins/ibc_plugin/include/eosio/ibc_plugin/ibc_plugin.hpp b/plugins/ibc_plugin/include/eosio/ibc_plugin/ibc_plugin.hpp index 0f1f277a3..bc5171bc9 100644 --- a/plugins/ibc_plugin/include/eosio/ibc_plugin/ibc_plugin.hpp +++ b/plugins/ibc_plugin/include/eosio/ibc_plugin/ibc_plugin.hpp @@ -189,7 +189,7 @@ namespace eosio { namespace ibc { }; struct hub_trx_info { - uint64_t cash_seq_num; + uint64_t id; uint64_t cash_time_slot; name from_chain; name from_account; @@ -247,7 +247,7 @@ FC_REFLECT( eosio::ibc::cashconfirm_action_params, (from_chain)(cash_trx_id)(cas FC_REFLECT( eosio::ibc::memo_info_type, (receiver)(chain)(notes) ) FC_REFLECT( eosio::ibc::hub_globals, (is_open)(hub_account)(unfinished_trxs) ) -FC_REFLECT( eosio::ibc::hub_trx_info, (cash_seq_num)(cash_time_slot)(from_chain)(from_account)(from_quantity) +FC_REFLECT( eosio::ibc::hub_trx_info, (id)(cash_time_slot)(from_chain)(from_account)(from_quantity) (mini_to_quantity)(orig_trx_id)(to_chain)(to_account)(orig_pure_memo)(to_quantity)(fee_receiver)(hub_trx_id) (hub_trx_time_slot)(forward_times)(backward_times) ) FC_REFLECT( eosio::ibc::hub_transfer_params, (from)(to)(quantity)(account)(chain)(orig_trx_id)(worker)(memo) )