Skip to content

Commit

Permalink
Merge branch 'beatrice' into 'master'
Browse files Browse the repository at this point in the history
Hotfix: Revert change to a son_update_operation

See merge request PBSA/peerplays!50
  • Loading branch information
bobinson committed Dec 17, 2021
2 parents 78730a4 + 632eb4a commit 9fd18b3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions libraries/app/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,11 +859,11 @@ application::~application() {

void application::set_program_options(boost::program_options::options_description &cli,
boost::program_options::options_description &cfg) const {
cfg.add_options()("p2p-endpoint", bpo::value<string>(), "Endpoint for P2P node to listen on");
cfg.add_options()("p2p-endpoint", bpo::value<string>()->default_value("0.0.0.0:9777"), "Endpoint for P2P node to listen on");
cfg.add_options()("seed-node,s", bpo::value<vector<string>>()->composing(), "P2P nodes to connect to on startup (may specify multiple times)");
cfg.add_options()("seed-nodes", bpo::value<string>()->composing(), "JSON array of P2P nodes to connect to on startup");
cfg.add_options()("checkpoint,c", bpo::value<vector<string>>()->composing(), "Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints.");
cfg.add_options()("rpc-endpoint", bpo::value<string>()->implicit_value("127.0.0.1:8090"), "Endpoint for websocket RPC to listen on");
cfg.add_options()("rpc-endpoint", bpo::value<string>()->default_value("127.0.0.1:8090"), "Endpoint for websocket RPC to listen on");
cfg.add_options()("rpc-tls-endpoint", bpo::value<string>()->implicit_value("127.0.0.1:8089"), "Endpoint for TLS websocket RPC to listen on");
cfg.add_options()("server-pem,p", bpo::value<string>()->implicit_value("server.pem"), "The TLS certificate file for this server");
cfg.add_options()("server-pem-password,P", bpo::value<string>()->implicit_value(""), "Password for this certificate");
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/db_management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ void database::reindex( fc::path data_dir )
}
for( uint32_t i = head_block_num() + 1; i <= last_block_num; ++i )
{
if( i % 10000 == 0 )
if( i % 1000000 == 0 )
{
ilog( "Writing database to disk at block ${i}", ("i",i) );
flush();
Expand Down
3 changes: 1 addition & 2 deletions libraries/chain/include/graphene/chain/protocol/son.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ namespace graphene { namespace chain {
optional<public_key_type> new_signing_key;
optional<flat_map<sidechain_type, string>> new_sidechain_public_keys;
optional<vesting_balance_id_type> new_pay_vb;
optional<son_status> new_status;

account_id_type fee_payer()const { return owner_account; }
share_type calculate_fee(const fee_parameters_type& k)const { return 0; }
Expand Down Expand Up @@ -105,7 +104,7 @@ FC_REFLECT(graphene::chain::son_create_operation, (fee)(owner_account)(url)(depo

FC_REFLECT(graphene::chain::son_update_operation::fee_parameters_type, (fee) )
FC_REFLECT(graphene::chain::son_update_operation, (fee)(son_id)(owner_account)(new_url)(new_deposit)
(new_signing_key)(new_sidechain_public_keys)(new_pay_vb)(new_status) )
(new_signing_key)(new_sidechain_public_keys)(new_pay_vb) )

FC_REFLECT(graphene::chain::son_deregister_operation::fee_parameters_type, (fee) )
FC_REFLECT(graphene::chain::son_deregister_operation, (fee)(son_id)(payer) )
Expand Down
5 changes: 1 addition & 4 deletions libraries/chain/son_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ void_result update_son_evaluator::do_evaluate(const son_update_operation& op)
FC_ASSERT(vbo.policy.which() == vesting_policy::tag<linear_vesting_policy>::value,
"Payment balance must have linear vesting policy");
}
if(op.new_status.valid()) {
FC_ASSERT(db().get(op.son_id).status == son_status::deregistered, "SON must be in deregistered state");
}
return void_result();
} FC_CAPTURE_AND_RETHROW( (op) ) }

Expand All @@ -97,7 +94,7 @@ object_id_type update_son_evaluator::do_apply(const son_update_operation& op)
if(op.new_signing_key.valid()) so.signing_key = *op.new_signing_key;
if(op.new_sidechain_public_keys.valid()) so.sidechain_public_keys = *op.new_sidechain_public_keys;
if(op.new_pay_vb.valid()) so.pay_vb = *op.new_pay_vb;
if(op.new_status.valid()) so.status = son_status::inactive;
if(so.status == son_status::deregistered) so.status = son_status::inactive;
});
}
return op.son_id;
Expand Down
1 change: 0 additions & 1 deletion libraries/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,6 @@ class wallet_api_impl
son_update_operation son_update_op;
son_update_op.son_id = son.id;
son_update_op.owner_account = son.son_account;
son_update_op.new_status = son_status::inactive;
signed_transaction tx;
tx.operations.push_back( son_update_op );
set_operation_fees( tx, _remote_db->get_global_properties().parameters.current_fees );
Expand Down

0 comments on commit 9fd18b3

Please sign in to comment.