Skip to content

Commit

Permalink
add relay
Browse files Browse the repository at this point in the history
  • Loading branch information
justfortest2 committed Nov 21, 2019
1 parent 5a69e98 commit 4a85336
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
21 changes: 14 additions & 7 deletions plugins/ibc_plugin/ibc_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,8 @@ namespace eosio { namespace ibc {
auto actn = get_action( account, N(chaininit), vector<permission_level>{{ my_impl->relay, config::active_name}}, mvo()
("header", fc::raw::pack(msg.header))
("active_schedule", msg.active_schedule)
("blockroot_merkle", msg.blockroot_merkle));
("blockroot_merkle", msg.blockroot_merkle)
("relay", my_impl->relay));

if ( ! actn.valid() ){
fc_elog(logger,"chain_init: get action failed");
Expand All @@ -976,7 +977,8 @@ namespace eosio { namespace ibc {
void ibc_chain_contract::pushsection( const lwc_section_data_message& msg ){
auto actn = get_action( account, N(pushsection), vector<permission_level>{{ my_impl->relay, config::active_name}}, mvo()
("headers", fc::raw::pack(msg.headers))
("blockroot_merkle", msg.blockroot_merkle));
("blockroot_merkle", msg.blockroot_merkle)
("relay", my_impl->relay));

if ( ! actn.valid() ){
fc_elog(logger,"newsection: get action failed");
Expand All @@ -990,7 +992,8 @@ namespace eosio { namespace ibc {
("headers", fc::raw::pack(msg.headers))
("blockroot_merkle", msg.blockroot_merkle)
("proof_data", msg.proof_data)
("proof_type", msg.proof_type));
("proof_type", msg.proof_type)
("relay", my_impl->relay));

if ( ! actn.valid() ){
fc_elog(logger,"newsection: get action failed");
Expand All @@ -1000,7 +1003,8 @@ namespace eosio { namespace ibc {
}

void ibc_chain_contract::rmfirstsctn(){
auto actn = get_action( account, N(rmfirstsctn), vector<permission_level>{{ my_impl->relay, config::active_name}}, mvo());
auto actn = get_action( account, N(rmfirstsctn), vector<permission_level>{{ my_impl->relay, config::active_name}}, mvo()
("relay", my_impl->relay));

if ( ! actn.valid() ){
fc_elog(logger,"newsection: get action failed");
Expand Down Expand Up @@ -1414,7 +1418,8 @@ namespace eosio { namespace ibc {
("anchor_block_num", par.anchor_block_num)
("to", par.to)
("quantity", par.quantity)
("memo", par.memo));
("memo", par.memo)
("relay", my_impl->relay));

if ( ! actn.valid() ){
fc_elog(logger,"get cash action failed");
Expand Down Expand Up @@ -1598,7 +1603,8 @@ namespace eosio { namespace ibc {
("anchor_block_num", par.anchor_block_num)
("to", par.to)
("quantity", par.quantity)
("memo", par.memo));
("memo", par.memo)
("relay", my_impl->relay));

if ( ! actn.valid() ){
fc_elog(logger,"cash: get action failed");
Expand Down Expand Up @@ -1653,7 +1659,8 @@ namespace eosio { namespace ibc {
auto trx_id = params->at(index);
auto actn = get_action( account, action_name, vector<permission_level>{{ my_impl->relay, config::active_name}}, mvo()
("peerchain_name", peerchain_name)
("trx_id", trx_id));
("trx_id", trx_id)
("relay", my_impl->relay));

if ( ! actn.valid() ){
fc_elog(logger,"newsection: get action failed");
Expand Down
1 change: 1 addition & 0 deletions plugins/ibc_plugin/include/eosio/ibc_plugin/ibc_plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ namespace eosio { namespace ibc {
name to;
asset quantity;
string memo;
name relay;
};

struct cashconfirm_action_params {
Expand Down

0 comments on commit 4a85336

Please sign in to comment.