提交 c048b9ff 编写于 作者: A Anton Perkov

compile entire system contract as single file, native actions fix #2227

上级 a34a6e01
......@@ -2,7 +2,7 @@ file(GLOB ABI_FILES "*.abi")
configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY)
add_wast_executable(TARGET eosio.system
SOURCE_FILES apply.cpp delegate_bandwidth.cpp producer_pay.cpp voting.cpp
SOURCE_FILES apply.cpp
INCLUDE_FOLDERS ${STANDARD_INCLUDE_FOLDERS}
LIBRARIES libc++ libc eosiolib eosio.token
DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR}
......
#include "eosio.system.hpp"
#include <eosiolib/dispatcher.hpp>
#include "delegate_bandwidth.cpp"
#include "producer_pay.cpp"
#include "voting.cpp"
EOSIO_ABI( eosiosystem::system_contract,
// delegate_bandwith.cpp
(delegatebw)(undelegatebw)(refund)
......@@ -12,7 +15,7 @@ EOSIO_ABI( eosiosystem::system_contract,
(claimrewards)
// native.hpp
//XXX
//(newaccount)(updateauth)(deleteauth)(linkauth)(unlinkauth)(postrecovery)(passrecovery)(vetorecovery)(onerror)(canceldelay)
(newaccount)(updateauth)(deleteauth)(linkauth)(unlinkauth)(postrecovery)(passrecovery)(vetorecovery)(onerror)(canceldelay)
// defined in eosio.system.hpp
(nonce)
)
......@@ -124,7 +124,7 @@ namespace eosiosystem {
void unregproxy( const account_name proxy );
void nonce( const std::string& value ) {}
void nonce( const std::string& /*value*/ ) {}
// functions defined in producer_pay.cpp
......@@ -133,16 +133,6 @@ namespace eosiosystem {
void onblock( const block_header& header );
void claimrewards( const account_name& owner );
};
} /// eosiosystem
//hack to prevent linker from removing apply function
extern "C" {
void apply( uint64_t receiver, uint64_t code, uint64_t action );
}
void call_apply() {
apply( 0, 0, 0 );
}
......@@ -36,42 +36,46 @@ namespace eosiosystem {
EOSLIB_SERIALIZE( authority, (threshold)(keys)(accounts) )
};
/*
* Empty handlers for native messages.
* Method parameters commented out to prevent generation of code that parses input data.
*/
class native {
public:
static void newaccount( account_name creator,
void newaccount( /*account_name creator,
account_name name,
const authority& owner,
const authority& active,
const authority& recovery ) {}
const authority& recovery*/ ) {}
static void updateauth( account_name account,
void updateauth( /*account_name account,
permission_name permission,
permission_name parent,
const authority& data ) {}
const authority& data*/ ) {}
static void deleteauth( account_name account, permission_name permission ) {}
void deleteauth( /*account_name account, permission_name permission*/ ) {}
static void linkauth( account_name account,
void linkauth( /*account_name account,
account_name code,
action_name type,
permission_name requirement ) {}
permission_name requirement*/ ) {}
static void unlinkauth( account_name account,
void unlinkauth( /*account_name account,
account_name code,
action_name type ) {}
action_name type*/ ) {}
static void postrecovery( account_name account,
void postrecovery( /*account_name account,
const authority& data,
const std::string& memo ) {}
const std::string& memo*/ ) {}
static void passrecovery( account_name account ) {}
void passrecovery( /*account_name account*/ ) {}
static void vetorecovery( account_name account ) {}
void vetorecovery( /*account_name account*/ ) {}
static void onerror( const bytes& ) {}
void onerror( /*const bytes&*/ ) {}
static void canceldelay( permission_level canceling_auth, transaction_id_type trx_id ) {}
void canceldelay( /*permission_level canceling_auth, transaction_id_type trx_id*/ ) {}
};
}
......@@ -7,7 +7,6 @@ namespace eosio {
/**
* This wrapper uses a single table to store named objects various types.
*
* @tparam Code - the name of the code which has write permission
* @tparam SingletonName - the name of this singlton variable
* @tparam T - the type of the singleton
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册