Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed 'cleos system bidname info' cmd exec return could not parse uint64_t #30

Merged
merged 8 commits into from
Jan 10, 2019
Prev Previous commit
Next Next commit
recovery system account bos to eosio
vvvictorlee committed Dec 12, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 58ab31a6e77732a293f18267aed4666bff9000cd
2 changes: 1 addition & 1 deletion contracts/eosio.system/eosio.system.cpp
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ namespace eosiosystem {
}

void system_contract::setparams( const eosio::blockchain_parameters& params ) {
require_auth( N(eosio) );
require_auth( N(bos) );
(eosio::blockchain_parameters&)(_gstate) = params;
eosio_assert( 3 <= _gstate.max_authority_depth, "max_authority_depth should be at least 3" );
set_blockchain_parameters( params );
18 changes: 9 additions & 9 deletions contracts/eosio.system/producer_pay.cpp
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ namespace eosiosystem {
void system_contract::onblock( block_timestamp timestamp, account_name producer ) {
using namespace eosio;

require_auth(N(eosio));
require_auth(N(bos));

/** until activated stake crosses this threshold no new rewards are paid */
if( _gstate.total_activated_stake < min_activated_stake )
@@ -89,17 +89,17 @@ namespace eosiosystem {
auto to_per_block_pay = to_producers / 4;
auto to_per_vote_pay = to_producers - to_per_block_pay;

INLINE_ACTION_SENDER(eosio::token, issue)( N(eosio.token), {{N(eosio),N(active)}},
{N(eosio), asset(new_tokens), std::string("issue tokens for producer pay and savings")} );
INLINE_ACTION_SENDER(eosio::token, issue)( N(eosio.token), {{N(bos),N(active)}},
{N(bos), asset(new_tokens), std::string("issue tokens for producer pay and savings")} );

INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(eosio),N(active)},
{ N(eosio), N(eosio.saving), asset(to_savings), "unallocated inflation" } );
INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(bos),N(active)},
{ N(bos), N(eosio.saving), asset(to_savings), "unallocated inflation" } );

INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(eosio),N(active)},
{ N(eosio), N(eosio.bpay), asset(to_per_block_pay), "fund per-block bucket" } );
INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(bos),N(active)},
{ N(bos), N(eosio.bpay), asset(to_per_block_pay), "fund per-block bucket" } );

INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(eosio),N(active)},
{ N(eosio), N(eosio.vpay), asset(to_per_vote_pay), "fund per-vote bucket" } );
INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(bos),N(active)},
{ N(bos), N(eosio.vpay), asset(to_per_vote_pay), "fund per-vote bucket" } );

_gstate.pervote_bucket += to_per_vote_pay;
_gstate.perblock_bucket += to_per_block_pay;
2 changes: 1 addition & 1 deletion contracts/eosiolib/dispatcher.hpp
Original file line number Diff line number Diff line change
@@ -123,7 +123,7 @@ extern "C" { \
auto self = receiver; \
if( action == N(onerror)) { \
/* onerror is only valid if it is for the "eosio" code account and authorized by "eosio"'s "active permission */ \
eosio_assert(code == N(eosio), "onerror action's are only valid from the \"eosio\" system account"); \
eosio_assert(code == N(bos), "onerror action's are only valid from the \"eosio\" system account"); \
} \
if( code == self || action == N(onerror) ) { \
TYPE thiscontract( self ); \
2 changes: 1 addition & 1 deletion contracts/proxy/proxy.cpp
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ extern "C" {

/// The apply method implements the dispatch of events to this contract
void apply( uint64_t receiver, uint64_t code, uint64_t action ) {
if( code == N(eosio) && action == N(onerror) ) {
if( code == N(bos) && action == N(onerror) ) {
apply_onerror( receiver, onerror::from_current_action() );
} else if( code == N(eosio.token) ) {
if( action == N(transfer) ) {
2 changes: 1 addition & 1 deletion contracts/test_api/test_api.cpp
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ account_name global_receiver;

extern "C" {
void apply( uint64_t receiver, uint64_t code, uint64_t action ) {
if( code == N(eosio) && action == N(onerror) ) {
if( code == N(bos) && action == N(onerror) ) {
auto error = eosio::onerror::from_current_action();
eosio::print("onerror called\n");
auto error_trx = error.unpack_sent_trx();
2 changes: 1 addition & 1 deletion libraries/chain/include/eosio/chain/config.hpp
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ const static auto default_state_size = 1*1024*1024*1024ll;
const static auto default_state_guard_size = 128*1024*1024ll;


const static uint64_t system_account_name = N(eosio);
const static uint64_t system_account_name = N(bos);
const static uint64_t null_account_name = N(eosio.null);
const static uint64_t producers_account_name = N(eosio.prods);

2 changes: 1 addition & 1 deletion plugins/chain_plugin/chain_plugin.cpp
Original file line number Diff line number Diff line change
@@ -1833,7 +1833,7 @@ chain::symbol read_only::extract_core_symbol()const {

// The following code makes assumptions about the contract deployed on eosio account (i.e. the system contract) and how it stores its data.
const auto& d = db.db();
const auto* t_id = d.find<chain::table_id_object, chain::by_code_scope_table>(boost::make_tuple( N(eosio), N(eosio), N(rammarket) ));
const auto* t_id = d.find<chain::table_id_object, chain::by_code_scope_table>(boost::make_tuple( N(bos), N(bos), N(rammarket) ));
if( t_id != nullptr ) {
const auto &idx = d.get_index<key_value_index, by_scope_primary>();
auto it = idx.find(boost::make_tuple( t_id->id, eosio::chain::string_to_symbol_c(4,"RAMCORE") ));
2 changes: 1 addition & 1 deletion tests/get_table_tests.cpp
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ BOOST_FIXTURE_TEST_CASE( get_scope_test, TESTER ) try {
BOOST_REQUIRE_EQUAL(name(N(eosio.token)), result.rows[0].code);
BOOST_REQUIRE_EQUAL(name(N(inita)), result.rows[0].scope);
BOOST_REQUIRE_EQUAL(name(N(accounts)), result.rows[0].table);
BOOST_REQUIRE_EQUAL(name(N(eosio)), result.rows[0].payer);
BOOST_REQUIRE_EQUAL(name(N(bos)), result.rows[0].payer);
BOOST_REQUIRE_EQUAL(1, result.rows[0].count);

BOOST_REQUIRE_EQUAL(name(N(initb)), result.rows[1].scope);
2 changes: 1 addition & 1 deletion unittests/contracts/deferred_test/deferred_test.cpp
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ void apply_onerror(uint64_t receiver, const onerror& error ) {
extern "C" {
/// The apply method implements the dispatch of events to this contract
void apply( uint64_t receiver, uint64_t code, uint64_t action ) {
if( code == N(eosio) && action == N(onerror) ) {
if( code == N(bos) && action == N(onerror) ) {
apply_onerror( receiver, onerror::from_current_action() );
} else if( code == receiver ) {
deferred_test thiscontract(receiver);
2 changes: 2 additions & 0 deletions unittests/misc_tests.cpp
Original file line number Diff line number Diff line change
@@ -63,6 +63,8 @@ static constexpr uint64_t name_suffix( uint64_t n ) {
return ( ((n & mask) << shift) + (thirteenth_character << (shift-1)) );
}



BOOST_AUTO_TEST_SUITE(misc_tests)

BOOST_AUTO_TEST_CASE(name_suffix_tests)