Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
justfortest2 committed Nov 21, 2019
1 parent aee8ec7 commit 3f3894b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
4 changes: 3 additions & 1 deletion ibc.chain/include/ibc.chain/ibc.chain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ namespace eosio {
if ( check_relay_auth ) {
relays _relays( ibc_contract_account, ibc_contract_account.value );
auto it = _relays.find( relay.value );
return it != _relays.end();
eosio_assert( it != _relays.end(), "this account is not registered as relay");
require_auth( relay );
}
Expand All @@ -182,6 +181,9 @@ namespace eosio {
[[eosio::action]]
void forceinit( );

[[eosio::action]]
void reqrelayauth( );

private:
// pipeline pbft related
void new_section( const signed_block_header& header, const incremental_merkle& blockroot_merkle );
Expand Down
10 changes: 9 additions & 1 deletion ibc.chain/src/ibc.chain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,14 @@ namespace eosio {
eosio_assert(false,"unknown action");
}

void chain::reqrelayauth( ){
if ( check_relay_auth ){
eosio_assert( false, "check_relay_auth == true" );
} else {
eosio_assert( false, "check_relay_auth == false" );
}
}

} /// namespace eosio

EOSIO_DISPATCH( eosio::chain, (setglobal)(chaininit)(pushsection)(rmfirstsctn)(pushblkcmits)(forceinit)(relay) )
EOSIO_DISPATCH( eosio::chain, (setglobal)(chaininit)(pushsection)(rmfirstsctn)(pushblkcmits)(forceinit)(relay)(reqrelayauth) )
3 changes: 3 additions & 0 deletions ibc.token/include/ibc.token/ibc.token.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ namespace eosio {
[[eosio::action]]
void forceinit( name peerchain_name ); //force init

[[eosio::action]]
void reqrelayauth( );

[[eosio::action]]
void open( name owner, const symbol_code& symcode, name ram_payer );

Expand Down
10 changes: 9 additions & 1 deletion ibc.token/src/ibc.token.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,14 @@ namespace eosio {
}
}

void token::reqrelayauth( ){
if ( check_relay_auth ){
eosio_assert( false, "check_relay_auth == true" );
} else {
eosio_assert( false, "check_relay_auth == false" );
}
}

} /// namespace eosio

extern "C" {
Expand All @@ -1320,7 +1328,7 @@ extern "C" {
(regacpttoken)(setacptasset)(setacptstr)(setacptint)(setacptbool)(setacptfee)
(regpegtoken)(setpegasset)(setpegint)(setpegbool)(setpegtkfee)
(transfer)(cash)(cashconfirm)(rollback)(rmunablerb)(fcrollback)(fcrmorigtrx)
(lockall)(unlockall)(forceinit)(open)(close))
(lockall)(unlockall)(forceinit)(open)(close)(reqrelayauth))
}
return;
}
Expand Down

0 comments on commit 3f3894b

Please sign in to comment.