Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Make necessary changes to make it compile with g++ #41

Merged
merged 1 commit into from
Jun 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/chain/chain_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ void chain_controller::initialize_chain(chain_initializer_interface& starter)
_db.create<block_summary_object>([&](block_summary_object&) {});

auto messages = starter.prepare_database(*this, _db);
std::for_each(messages.begin(), messages.end(), [this](const auto& m) { process_message(m); });
std::for_each(messages.begin(), messages.end(), [this](const Message& m) { process_message(m); });
});
}
} FC_CAPTURE_AND_RETHROW() }
Expand Down
10 changes: 4 additions & 6 deletions plugins/producer_plugin/producer_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
using std::string;
using std::vector;

namespace bpo = boost::program_options;

namespace eos {

class producer_plugin_impl {
Expand Down Expand Up @@ -98,11 +96,11 @@ void producer_plugin::set_program_options(
eos::utilities::key_to_wif(default_priv_key));

command_line_options.add_options()
("enable-stale-production", bpo::bool_switch()->notifier([this](bool e){my->_production_enabled = e;}), "Enable block production, even if the chain is stale.")
("required-participation", bpo::bool_switch()->notifier([this](int e){my->_required_producer_participation = uint32_t(e*config::Percent1);}), "Percent of producers (0-99) that must be participating in order to produce blocks")
("producer-name,p", bpo::value<vector<string>>()->composing()->multitoken(),
("enable-stale-production", boost::program_options::bool_switch()->notifier([this](bool e){my->_production_enabled = e;}), "Enable block production, even if the chain is stale.")
("required-participation", boost::program_options::bool_switch()->notifier([this](int e){my->_required_producer_participation = uint32_t(e*config::Percent1);}), "Percent of producers (0-99) that must be participating in order to produce blocks")
("producer-name,p", boost::program_options::value<vector<string>>()->composing()->multitoken(),
("ID of producer controlled by this node (e.g. " + producer_id_example + ", quotes are required, may specify multiple times)").c_str())
("private-key", bpo::value<vector<string>>()->composing()->multitoken()->default_value({fc::json::to_string(private_key_default)},
("private-key", boost::program_options::value<vector<string>>()->composing()->multitoken()->default_value({fc::json::to_string(private_key_default)},
fc::json::to_string(private_key_default)),
"Tuple of [PublicKey, WIF private key] (may specify multiple times)")
;
Expand Down
4 changes: 2 additions & 2 deletions tests/tests/misc_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ BOOST_AUTO_TEST_CASE(median_properties_test)

votes.emplace_back(BlockchainConfiguration{1, 1, 1, 1, 1, 1, 1});
votes.emplace_back(BlockchainConfiguration{1, 1, 1, 1, 1, 1, 1});
medians = {1024, 100, 1000, Asset(3333).amount, Asset(50).amount, Asset(50).amount, 100};
medians = BlockchainConfiguration {1024, 100, 1000, Asset(3333).amount, Asset(50).amount, Asset(50).amount, 100};

BOOST_CHECK_EQUAL(BlockchainConfiguration::get_median_values(votes), medians);
BOOST_CHECK_EQUAL(BlockchainConfiguration::get_median_values({medians}), medians);

votes.erase(votes.begin() + 2);
votes.erase(votes.end() - 1);
medians = {1024, 100, 1024, Asset(3333).amount, Asset(50).amount, Asset(100).amount, 100};
medians = BlockchainConfiguration {1024, 100, 1024, Asset(3333).amount, Asset(50).amount, Asset(100).amount, 100};
BOOST_CHECK_EQUAL(BlockchainConfiguration::get_median_values(votes), medians);
} FC_LOG_AND_RETHROW() }

Expand Down