Skip to content

Commit

Permalink
merging master @ b07081e to resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
b1bart committed Feb 26, 2018
2 parents 75dedbb + b07081e commit 734879f
Show file tree
Hide file tree
Showing 11 changed files with 621 additions and 177 deletions.
1 change: 0 additions & 1 deletion contracts/eosiolib/eosiolib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ namespace eosio {
{
_heap_size = size;
_heap = mem_heap;
memset(_heap, 0, _heap_size);
}

uint32_t is_init() const
Expand Down
4 changes: 4 additions & 0 deletions libraries/chain/chain_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ chain_controller::chain_controller( const chain_controller::controller_config& c
{
_initialize_indexes();

for (auto& f : cfg.applied_block_callbacks)
applied_block.connect(f);
for (auto& f : cfg.applied_irreversible_block_callbacks)
applied_irreversible_block.connect(f);
for (auto& f : cfg.on_pending_transaction_callbacks)
on_pending_transaction.connect(f);

contracts::chain_initializer starter(cfg.genesis);
starter.register_types(*this, _db);
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/include/eosio/chain/authority_checker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace detail {
bool operator()(const meta_permission& a, const meta_permission& b) const {
get_weight_visitor scale;
if (a.visit(scale) > b.visit(scale)) return true;
return a.contains<key_weight>() && !b.contains<permission_level_weight>();
return a.contains<key_weight>() && b.contains<permission_level_weight>();
}
};

Expand Down
18 changes: 18 additions & 0 deletions libraries/chain/include/eosio/chain/chain_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@ struct chain_config {
uint32_t max_generated_transaction_size;

static chain_config get_median_values( vector<chain_config> votes );

template<typename Stream>
friend Stream& operator << ( Stream& out, const chain_config& c ) {
return out << "Target Block Size: " << c.target_block_size << ", "
<< "Max Block Size: " << c.max_block_size << ", "
<< "Target Block Acts Per Scope: " << c.target_block_acts_per_scope << ", "
<< "Max Block Acts Per Scope: " << c.max_block_acts_per_scope << ", "
<< "Target Block Acts: " << c.target_block_acts << ", "
<< "Max Block Acts: " << c.max_block_acts << ", "
<< "Real Threads: " << c.real_threads << ", "
<< "Max Storage Size: " << c.max_storage_size << ", "
<< "Max Transaction Lifetime: " << c.max_transaction_lifetime << ", "
<< "Max Authority Depth: " << c.max_authority_depth << ", "
<< "Max Transaction Exec Time: " << c.max_transaction_exec_time << ", "
<< "Max Inline Depth: " << c.max_inline_depth << ", "
<< "Max Inline Action Size: " << c.max_inline_action_size << ", "
<< "Max Generated Transaction Size: " << c.max_generated_transaction_size << "\n";
}
};

bool operator==(const chain_config& a, const chain_config& b);
Expand Down
4 changes: 3 additions & 1 deletion libraries/chain/include/eosio/chain/chain_controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@ namespace eosio { namespace chain {
path shared_memory_dir = config::default_shared_memory_dir;
uint64_t shared_memory_size = config::default_shared_memory_size;
bool read_only = false;
std::vector<signal<void(const block_trace&)>::slot_type> applied_block_callbacks;
std::vector<signal<void(const signed_block&)>::slot_type> applied_irreversible_block_callbacks;
std::vector<signal<void(const transaction_metadata&, const packed_transaction&)>::slot_type> on_pending_transaction_callbacks;
contracts::genesis_state_type genesis;
runtime_limits limits;
};

chain_controller( const controller_config& cfg );
explicit chain_controller( const controller_config& cfg );
~chain_controller();


Expand Down
2 changes: 0 additions & 2 deletions libraries/chain/include/eosio/chain/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ const static uint64_t eosio_all_scope = N(eosio.all);
const static uint64_t active_name = N(active);
const static uint64_t owner_name = N(owner);

const static share_type initial_token_supply = asset::from_string("1000000000.0000 EOS").amount;

const static int block_interval_ms = 500;
const static int block_interval_us = block_interval_ms*1000;
const static uint64_t block_timestamp_epoch = 946684800000ll; // epoch is year 2000.
Expand Down
1 change: 0 additions & 1 deletion libraries/chain/include/eosio/chain/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ namespace eosio { namespace chain {
using std::make_pair;
using std::enable_shared_from_this;
using std::tie;
using std::make_pair;
using std::move;
using std::forward;
using std::to_string;
Expand Down
Loading

0 comments on commit 734879f

Please sign in to comment.