Merge branch 'hotfix/remove_fc_smart_ref' into develop
This commit is contained in:
commit
fd6d910266
67 changed files with 62 additions and 138 deletions
|
|
@ -38,7 +38,6 @@
|
|||
#include <graphene/chain/tournament_object.hpp>
|
||||
|
||||
#include <fc/crypto/hex.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/rpc/api_connection.hpp>
|
||||
#include <fc/thread/future.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@
|
|||
#include <graphene/utilities/key_conversion.hpp>
|
||||
#include <graphene/chain/worker_evaluator.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <fc/io/fstream.hpp>
|
||||
#include <fc/rpc/api_connection.hpp>
|
||||
#include <fc/rpc/websocket_api.hpp>
|
||||
|
|
@ -80,7 +78,7 @@ namespace detail {
|
|||
auto nathan_key = fc::ecc::private_key::regenerate(fc::sha256::hash(string("nathan")));
|
||||
dlog("Allocating all stake to ${key}", ("key", utilities::key_to_wif(nathan_key)));
|
||||
genesis_state_type initial_state;
|
||||
initial_state.initial_parameters.current_fees = fee_schedule::get_default();//->set_all_fees(GRAPHENE_BLOCKCHAIN_PRECISION);
|
||||
initial_state.initial_parameters.current_fees = std::make_shared<fee_schedule>(fee_schedule::get_default());
|
||||
initial_state.initial_active_witnesses = GRAPHENE_DEFAULT_MIN_WITNESS_COUNT;
|
||||
initial_state.initial_timestamp = time_point_sec(time_point::now().sec_since_epoch() /
|
||||
initial_state.initial_parameters.block_interval *
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include <graphene/chain/pts_address.hpp>
|
||||
|
||||
#include <fc/bloom_filter.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <fc/crypto/hex.hpp>
|
||||
#include <fc/rpc/api_connection.hpp>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ add_library( graphene_chain
|
|||
protocol/assert.cpp
|
||||
protocol/account.cpp
|
||||
protocol/transfer.cpp
|
||||
protocol/chain_parameters.cpp
|
||||
protocol/committee_member.cpp
|
||||
protocol/witness.cpp
|
||||
protocol/market.cpp
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <graphene/chain/account_evaluator.hpp>
|
||||
#include <graphene/chain/buyback.hpp>
|
||||
#include <graphene/chain/buyback_object.hpp>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#define DEFAULT_LOGGER "betting"
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <graphene/chain/betting_market_evaluator.hpp>
|
||||
#include <graphene/chain/betting_market_object.hpp>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#include <graphene/chain/block_database.hpp>
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@
|
|||
#include <graphene/chain/protocol/vote.hpp>
|
||||
#include <graphene/chain/transaction_evaluation_state.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
void_result committee_member_create_evaluator::do_evaluate( const committee_member_create_operation& op )
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
#include <graphene/chain/fba_accumulator_id.hpp>
|
||||
#include <graphene/chain/hardfork.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
void_result transfer_to_blind_evaluator::do_evaluate( const transfer_to_blind_operation& o )
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include "db_balance.cpp"
|
||||
#include "db_bet.cpp"
|
||||
#include "db_block.cpp"
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@
|
|||
#include <graphene/chain/witness_schedule_object.hpp>
|
||||
#include <fc/crypto/digest.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@
|
|||
#include <graphene/chain/son_object.hpp>
|
||||
#include <graphene/chain/son_proposal_object.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <ctime>
|
||||
#include <algorithm>
|
||||
|
||||
|
|
@ -68,7 +66,7 @@ const dynamic_global_property_object& database::get_dynamic_global_properties()
|
|||
|
||||
const fee_schedule& database::current_fee_schedule()const
|
||||
{
|
||||
return get_global_properties().parameters.current_fees;
|
||||
return std::ref( *get_global_properties().parameters.current_fees );
|
||||
}
|
||||
|
||||
time_point_sec database::head_block_time()const
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@
|
|||
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/uint128.hpp>
|
||||
#include <fc/crypto/digest.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include <boost/multiprecision/integer.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/uint128.hpp>
|
||||
|
||||
#include <graphene/chain/database.hpp>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#include <graphene/chain/fork_database.hpp>
|
||||
#include <graphene/chain/exceptions.hpp>
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
fork_database::fork_database()
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include <graphene/chain/genesis_state.hpp>
|
||||
|
||||
// these are required to serialize a genesis_state
|
||||
#include <fc/smart_ref_impl.hpp> // required for gcc in release mode
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include <graphene/chain/protocol/base.hpp>
|
||||
#include <graphene/chain/protocol/ext.hpp>
|
||||
#include <graphene/chain/protocol/types.hpp>
|
||||
#include <fc/smart_ref_fwd.hpp>
|
||||
|
||||
#include <graphene/chain/hardfork.hpp>
|
||||
#include <../hardfork.d/GPOS.hf>
|
||||
|
|
@ -72,8 +72,9 @@ namespace graphene { namespace chain {
|
|||
|
||||
struct chain_parameters
|
||||
{
|
||||
chain_parameters();
|
||||
/** using a smart ref breaks the circular dependency created between operations and the fee schedule */
|
||||
smart_ref<fee_schedule> current_fees; ///< current schedule of fees
|
||||
std::shared_ptr<fee_schedule> current_fees; ///< current schedule of fees
|
||||
uint8_t block_interval = GRAPHENE_DEFAULT_BLOCK_INTERVAL; ///< interval in seconds between blocks
|
||||
uint32_t maintenance_interval = GRAPHENE_DEFAULT_MAINTENANCE_INTERVAL; ///< interval in sections between blockchain maintenance events
|
||||
uint8_t maintenance_skip_slots = GRAPHENE_DEFAULT_MAINTENANCE_SKIP_SLOTS; ///< number of block_intervals to skip at maintenance time
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#pragma once
|
||||
#include <fc/smart_ref_fwd.hpp>
|
||||
#include <graphene/chain/protocol/operations.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
|
@ -84,6 +83,10 @@ namespace graphene { namespace chain {
|
|||
|
||||
} } // graphene::chain
|
||||
|
||||
namespace fc {
|
||||
template<> struct get_typename<std::shared_ptr<graphene::chain::fee_schedule>> { static const char* name() { return "shared_ptr<fee_schedule>"; } };
|
||||
}
|
||||
|
||||
FC_REFLECT_TYPENAME( graphene::chain::fee_parameters )
|
||||
FC_REFLECT( graphene::chain::fee_schedule, (parameters)(scale) )
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
#include <fc/io/raw_fwd.hpp>
|
||||
#include <fc/uint128.hpp>
|
||||
#include <fc/static_variant.hpp>
|
||||
#include <fc/smart_ref_fwd.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
#include <graphene/chain/protocol/market.hpp>
|
||||
|
||||
#include <fc/uint128.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
void_result limit_order_create_evaluator::do_evaluate(const limit_order_create_operation& op)
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@
|
|||
#include <graphene/chain/exceptions.hpp>
|
||||
#include <graphene/chain/hardfork.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
struct proposal_operation_hardfork_visitor
|
||||
|
|
|
|||
8
libraries/chain/protocol/chain_parameters.cpp
Normal file
8
libraries/chain/protocol/chain_parameters.cpp
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#include <graphene/chain/protocol/chain_parameters.hpp>
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
chain_parameters::chain_parameters() {
|
||||
current_fees = std::make_shared<fee_schedule>();
|
||||
}
|
||||
}}
|
||||
|
|
@ -21,7 +21,6 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <graphene/chain/protocol/committee_member.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -23,17 +23,6 @@
|
|||
*/
|
||||
#include <algorithm>
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
namespace fc
|
||||
{
|
||||
// explicitly instantiate the smart_ref, gcc fails to instantiate it in some release builds
|
||||
//template graphene::chain::fee_schedule& smart_ref<graphene::chain::fee_schedule>::operator=(smart_ref<graphene::chain::fee_schedule>&&);
|
||||
//template graphene::chain::fee_schedule& smart_ref<graphene::chain::fee_schedule>::operator=(U&&);
|
||||
//template graphene::chain::fee_schedule& smart_ref<graphene::chain::fee_schedule>::operator=(const smart_ref&);
|
||||
//template smart_ref<graphene::chain::fee_schedule>::smart_ref();
|
||||
//template const graphene::chain::fee_schedule& smart_ref<graphene::chain::fee_schedule>::operator*() const;
|
||||
}
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
|
|
@ -41,10 +30,6 @@ namespace fc
|
|||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
typedef fc::smart_ref<fee_schedule> smart_fee_schedule;
|
||||
|
||||
static smart_fee_schedule tmp;
|
||||
|
||||
fee_schedule::fee_schedule()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <graphene/chain/protocol/operations.hpp>
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
*/
|
||||
#include <graphene/chain/protocol/operations.hpp>
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <graphene/chain/protocol/balance.hpp>
|
||||
#include <graphene/chain/protocol/buyback.hpp>
|
||||
#include <graphene/chain/protocol/fba.hpp>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
#include <fc/bitutil.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <algorithm>
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@
|
|||
#include <graphene/chain/worker_object.hpp>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::balance_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::block_summary_object )
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ namespace graphene { namespace chain {
|
|||
[&m, &exc](ObjectType& o) mutable {
|
||||
try {
|
||||
m(o);
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception& e) {
|
||||
exc = std::current_exception();
|
||||
elog("Exception while modifying object: ${e} -- object may be corrupted",
|
||||
("e", e));
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <fc/filesystem.hpp>
|
||||
#include <fc/smart_ref_impl.hpp> // required for gcc in release mode
|
||||
#include <fc/string.hpp>
|
||||
#include <fc/io/fstream.hpp>
|
||||
#include <fc/io/json.hpp>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@
|
|||
#include <fc/crypto/rand.hpp>
|
||||
#include <fc/network/rate_limiting.hpp>
|
||||
#include <fc/network/ip.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <graphene/net/node.hpp>
|
||||
#include <graphene/net/peer_database.hpp>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
#include <graphene/chain/transaction_evaluation_state.hpp>
|
||||
#include <graphene/chain/hardfork.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/thread/thread.hpp>
|
||||
|
||||
namespace graphene { namespace account_history {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include <graphene/chain/operation_history_object.hpp>
|
||||
#include <graphene/chain/transaction_evaluation_state.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/thread/thread.hpp>
|
||||
|
||||
namespace graphene { namespace accounts_list {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include <fc/optional.hpp>
|
||||
#include <fc/variant_object.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <graphene/app/application.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
#include <graphene/chain/operation_history_object.hpp>
|
||||
#include <graphene/chain/transaction_evaluation_state.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/thread/thread.hpp>
|
||||
|
||||
namespace graphene { namespace affiliate_stats {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#include <fc/filesystem.hpp>
|
||||
#include <fc/optional.hpp>
|
||||
#include <fc/variant_object.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <graphene/app/application.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
|
||||
#include <boost/algorithm/string/case_conv.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/thread/thread.hpp>
|
||||
|
||||
#include <boost/polymorphic_cast.hpp>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
#include <fc/filesystem.hpp>
|
||||
#include <fc/optional.hpp>
|
||||
#include <fc/variant_object.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <graphene/app/application.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
#include <graphene/utilities/key_conversion.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/thread/thread.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@
|
|||
#include <fc/network/http/websocket.hpp>
|
||||
#include <fc/rpc/websocket_api.hpp>
|
||||
#include <fc/api.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
|
||||
namespace graphene { namespace delayed_node {
|
||||
namespace bpo = boost::program_options;
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
#include <graphene/es_objects/es_objects.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <graphene/chain/proposal_object.hpp>
|
||||
#include <graphene/chain/balance_object.hpp>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
#include <graphene/utilities/key_conversion.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/thread/thread.hpp>
|
||||
|
||||
#include <graphene/chain/market_object.hpp>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
#include <graphene/utilities/key_conversion.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/thread/thread.hpp>
|
||||
|
||||
#include <graphene/chain/market_object.hpp>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
|
||||
#include <fc/thread/thread.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
namespace graphene { namespace market_history {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include <fc/crypto/base58.hpp>
|
||||
#include <fc/crypto/sha256.hpp>
|
||||
#include <graphene/peerplays_sidechain/bitcoin/bitcoin_address.hpp>
|
||||
#include <graphene/peerplays_sidechain/bitcoin/bitcoin_script.hpp>
|
||||
#include <graphene/peerplays_sidechain/bitcoin/segwit_addr.hpp>
|
||||
|
|
@ -99,7 +100,7 @@ bool bitcoin_address::is_p2pk() const {
|
|||
parse_hex(address);
|
||||
return true;
|
||||
}
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -121,7 +122,7 @@ bool bitcoin_address::is_p2pkh() const {
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -134,7 +135,7 @@ bool bitcoin_address::is_p2sh() const {
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -269,7 +270,7 @@ void btc_weighted_multisig_address::create_redeem_script(const std::vector<std::
|
|||
|
||||
redeem_script_ = builder;
|
||||
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_);
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_.data(), redeem_script_.size());
|
||||
raw_address = bytes(sh.data(), sh.data() + sh.data_size());
|
||||
}
|
||||
|
||||
|
|
@ -323,7 +324,7 @@ void btc_one_or_m_of_n_multisig_address::create_redeem_script(const fc::ecc::pub
|
|||
builder << op::CHECKMULTISIG;
|
||||
builder << op::ENDIF;
|
||||
redeem_script_ = builder;
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_);
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_.data(), redeem_script_.size());
|
||||
raw_address = bytes(sh.data(), sh.data() + sh.data_size());
|
||||
}
|
||||
void btc_one_or_m_of_n_multisig_address::create_witness_script() {
|
||||
|
|
@ -384,7 +385,7 @@ void btc_one_or_weighted_multisig_address::create_redeem_script(const fc::ecc::p
|
|||
builder << op::GREATERTHANOREQUAL;
|
||||
builder << op::ENDIF;
|
||||
redeem_script_ = builder;
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_);
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_.data(), redeem_script_.size());
|
||||
raw_address = bytes(sh.data(), sh.data() + sh.data_size());
|
||||
}
|
||||
|
||||
|
|
@ -448,7 +449,7 @@ void btc_timelocked_one_or_weighted_multisig_address::create_redeem_script(const
|
|||
builder << op::GREATERTHANOREQUAL;
|
||||
builder << op::ENDIF;
|
||||
redeem_script_ = builder;
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_);
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_.data(), redeem_script_.size());
|
||||
raw_address = bytes(sh.data(), sh.data() + sh.data_size());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@
|
|||
#include <boost/range/algorithm_ext/insert.hpp>
|
||||
|
||||
#include <fc/log/logger.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <graphene/chain/proposal_object.hpp>
|
||||
#include <graphene/chain/protocol/transfer.hpp>
|
||||
#include <graphene/chain/sidechain_address_object.hpp>
|
||||
|
|
@ -356,7 +354,7 @@ void peerplays_sidechain_plugin_impl::heartbeat_loop() {
|
|||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
return true;
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending heartbeat failed with exception ${e}", ("e", e.what()));
|
||||
return false;
|
||||
}
|
||||
|
|
@ -468,7 +466,7 @@ void peerplays_sidechain_plugin_impl::approve_proposals() {
|
|||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
return true;
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending approval failed with exception ${e}", ("e", e.what()));
|
||||
return false;
|
||||
}
|
||||
|
|
@ -544,7 +542,7 @@ void peerplays_sidechain_plugin_impl::create_son_down_proposals() {
|
|||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
return true;
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending son down proposal failed with exception ${e}", ("e", e.what()));
|
||||
return false;
|
||||
}
|
||||
|
|
@ -579,7 +577,7 @@ void peerplays_sidechain_plugin_impl::create_son_deregister_proposals() {
|
|||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
return true;
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending son deregister proposal failed with exception ${e}", ("e", e.what()));
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#include <graphene/peerplays_sidechain/sidechain_net_handler.hpp>
|
||||
|
||||
#include <fc/log/logger.hpp>
|
||||
#include <fc/smart_ref_fwd.hpp>
|
||||
#include <graphene/chain/chain_property_object.hpp>
|
||||
#include <graphene/chain/proposal_object.hpp>
|
||||
|
||||
|
|
@ -138,7 +137,7 @@ bool sidechain_net_handler::approve_proposal(const proposal_id_type &proposal_id
|
|||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
return true;
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending approval from ${son_id} for proposal ${proposal_id} failed with exception ${e}",
|
||||
("son_id", son_id)("proposal_id", proposal_id)("e", e.what()));
|
||||
return false;
|
||||
|
|
@ -205,7 +204,7 @@ void sidechain_net_handler::sidechain_event_data_received(const sidechain_event_
|
|||
database.push_transaction(trx, database::validation_steps::skip_block_size_check);
|
||||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending son wallet deposit create operation by ${son} failed with exception ${e}", ("son", son_id)("e", e.what()));
|
||||
}
|
||||
}
|
||||
|
|
@ -247,7 +246,7 @@ void sidechain_net_handler::sidechain_event_data_received(const sidechain_event_
|
|||
database.push_transaction(trx, database::validation_steps::skip_block_size_check);
|
||||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending son wallet withdraw create operation by ${son} failed with exception ${e}", ("son", son_id)("e", e.what()));
|
||||
}
|
||||
}
|
||||
|
|
@ -460,7 +459,7 @@ void sidechain_net_handler::process_sidechain_transactions() {
|
|||
database.push_transaction(trx, database::validation_steps::skip_block_size_check);
|
||||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending proposal for sidechain transaction sign operation failed with exception ${e}", ("e", e.what()));
|
||||
}
|
||||
});
|
||||
|
|
@ -495,7 +494,7 @@ void sidechain_net_handler::send_sidechain_transactions() {
|
|||
database.push_transaction(trx, database::validation_steps::skip_block_size_check);
|
||||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending proposal for sidechain transaction send operation failed with exception ${e}", ("e", e.what()));
|
||||
}
|
||||
});
|
||||
|
|
@ -560,7 +559,7 @@ void sidechain_net_handler::settle_sidechain_transactions() {
|
|||
database.push_transaction(trx, database::validation_steps::skip_block_size_check);
|
||||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending proposal for sidechain transaction settle operation failed with exception ${e}", ("e", e.what()));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -940,7 +940,7 @@ sidechain_net_handler_bitcoin::sidechain_net_handler_bitcoin(peerplays_sidechain
|
|||
fc::http::connection conn;
|
||||
try {
|
||||
conn.connect_to(fc::ip::endpoint(fc::ip::address(ip), rpc_port));
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("No BTC node running at ${ip} or wrong rpc port: ${port}", ("ip", ip)("port", rpc_port));
|
||||
FC_ASSERT(false);
|
||||
}
|
||||
|
|
@ -1324,7 +1324,7 @@ void sidechain_net_handler_bitcoin::process_primary_wallet() {
|
|||
database.push_transaction(trx, database::validation_steps::skip_block_size_check);
|
||||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending proposal for son wallet update operation failed with exception ${e}", ("e", e.what()));
|
||||
return;
|
||||
}
|
||||
|
|
@ -1375,7 +1375,7 @@ void sidechain_net_handler_bitcoin::process_sidechain_addresses() {
|
|||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
return true;
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending proposal for deposit sidechain transaction create operation failed with exception ${e}", ("e", e.what()));
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1420,7 +1420,7 @@ bool sidechain_net_handler_bitcoin::process_deposit(const son_wallet_deposit_obj
|
|||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
return true;
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending proposal for deposit sidechain transaction create operation failed with exception ${e}", ("e", e.what()));
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1464,7 +1464,7 @@ bool sidechain_net_handler_bitcoin::process_withdrawal(const son_wallet_withdraw
|
|||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
return true;
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending proposal for withdraw sidechain transaction create operation failed with exception ${e}", ("e", e.what()));
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include <fc/network/ip.hpp>
|
||||
|
||||
#include <graphene/chain/account_object.hpp>
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <graphene/chain/protocol/son_wallet.hpp>
|
||||
#include <graphene/chain/son_info.hpp>
|
||||
#include <graphene/chain/son_wallet_object.hpp>
|
||||
|
|
@ -149,7 +150,7 @@ void sidechain_net_handler_peerplays::process_sidechain_addresses() {
|
|||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
return true;
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending transaction for update deposit address operation failed with exception ${e}", ("e", e.what()));
|
||||
return false;
|
||||
}
|
||||
|
|
@ -203,7 +204,7 @@ bool sidechain_net_handler_peerplays::process_deposit(const son_wallet_deposit_o
|
|||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
return true;
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sending proposal for deposit sidechain transaction create operation failed with exception ${e}", ("e", e.what()));
|
||||
return false;
|
||||
}
|
||||
|
|
@ -254,7 +255,7 @@ std::string sidechain_net_handler_peerplays::send_sidechain_transaction(const si
|
|||
if (plugin.app().p2p_node())
|
||||
plugin.app().p2p_node()->broadcast(net::trx_message(trx));
|
||||
return trx.id().str();
|
||||
} catch (fc::exception e) {
|
||||
} catch (fc::exception &e) {
|
||||
elog("Sidechain transaction failed with exception ${e}", ("e", e.what()));
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
#include <boost/range/algorithm_ext/insert.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/thread/thread.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@
|
|||
#include <graphene/wallet/api_documentation.hpp>
|
||||
#include <graphene/wallet/reflect_util.hpp>
|
||||
#include <graphene/debug_witness/debug_api.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#ifndef WIN32
|
||||
# include <sys/types.h>
|
||||
|
|
@ -662,10 +661,10 @@ public:
|
|||
return ob.template as<T>( GRAPHENE_MAX_NESTED_OBJECTS );
|
||||
}
|
||||
|
||||
void set_operation_fees( signed_transaction& tx, const fee_schedule& s )
|
||||
void set_operation_fees( signed_transaction& tx, std::shared_ptr<fee_schedule> s )
|
||||
{
|
||||
for( auto& op : tx.operations )
|
||||
s.set_fee(op);
|
||||
s->set_fee(op);
|
||||
}
|
||||
|
||||
variant info() const
|
||||
|
|
@ -1307,8 +1306,7 @@ public:
|
|||
|
||||
tx.operations.push_back( account_create_op );
|
||||
|
||||
auto current_fees = _remote_db->get_global_properties().parameters.current_fees;
|
||||
set_operation_fees( tx, current_fees );
|
||||
set_operation_fees( tx, _remote_db->get_global_properties().parameters.current_fees );
|
||||
|
||||
vector<public_key_type> paying_keys = registrar_account_object.active.get_keys();
|
||||
|
||||
|
|
@ -3496,7 +3494,7 @@ public:
|
|||
new_fees.scale = scale;
|
||||
|
||||
chain_parameters new_params = current_params;
|
||||
new_params.current_fees = new_fees;
|
||||
new_params.current_fees = std::make_shared<fee_schedule>(new_fees);
|
||||
|
||||
committee_member_update_global_parameters_operation update_op;
|
||||
update_op.new_parameters = new_params;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#include <graphene/chain/account_object.hpp>
|
||||
#include <graphene/chain/balance_object.hpp>
|
||||
#include <graphene/chain/committee_member_object.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <iostream>
|
||||
|
||||
using namespace graphene::chain;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include <fc/rpc/cli.hpp>
|
||||
#include <fc/rpc/http_api.hpp>
|
||||
#include <fc/rpc/websocket_api.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <graphene/app/api.hpp>
|
||||
#include <graphene/chain/config.hpp>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include <fc/io/fstream.hpp>
|
||||
#include <fc/io/json.hpp>
|
||||
#include <fc/io/stdio.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <graphene/app/api.hpp>
|
||||
#include <graphene/chain/protocol/address.hpp>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@
|
|||
#include <graphene/chain/sidechain_address_object.hpp>
|
||||
#include <graphene/chain/sidechain_transaction_object.hpp>
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <iostream>
|
||||
|
||||
using namespace graphene::chain;
|
||||
|
|
@ -128,7 +127,6 @@ struct js_name<fc::array<T,N>>
|
|||
template<size_t N> struct js_name<fc::array<char,N>> { static std::string name(){ return "bytes "+ fc::to_string(N); }; };
|
||||
template<size_t N> struct js_name<fc::array<uint8_t,N>> { static std::string name(){ return "bytes "+ fc::to_string(N); }; };
|
||||
template<typename T> struct js_name< fc::optional<T> > { static std::string name(){ return "optional " + js_name<T>::name(); } };
|
||||
template<typename T> struct js_name< fc::smart_ref<T> > { static std::string name(){ return js_name<T>::name(); } };
|
||||
template<> struct js_name< object_id_type > { static std::string name(){ return "object_id_type"; } };
|
||||
template<typename T> struct js_name< fc::flat_set<T> > { static std::string name(){ return "set " + js_name<T>::name(); } };
|
||||
template<typename T> struct js_name< std::vector<T> > { static std::string name(){ return "array " + js_name<T>::name(); } };
|
||||
|
|
@ -256,14 +254,6 @@ struct serializer<std::vector<T>,false>
|
|||
static void generate() {}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct serializer<fc::smart_ref<T>,false>
|
||||
{
|
||||
static void init() {
|
||||
serializer<T>::init(); }
|
||||
static void generate() {}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct serializer<std::vector<operation>,false>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
*/
|
||||
|
||||
#include <fc/io/json.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/variant.hpp>
|
||||
#include <fc/variant_object.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
#include <graphene/affiliate_stats/affiliate_stats_plugin.hpp>
|
||||
#include <graphene/market_history/market_history_plugin.hpp>
|
||||
#include <fc/thread/thread.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
#include <graphene/utilities/tempdir.hpp>
|
||||
|
||||
#include <fc/crypto/digest.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <boost/test/auto_unit_test.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include <fc/crypto/base58.hpp>
|
||||
|
||||
#include <fc/crypto/aes.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef _WIN32_WINNT
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#include "cli_fixture.hpp"
|
||||
|
||||
#include <fc/crypto/aes.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <graphene/utilities/tempdir.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
*/
|
||||
#include "cli_fixture.hpp"
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/string.hpp>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
#include <graphene/utilities/tempdir.hpp>
|
||||
|
||||
#include <fc/crypto/digest.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
|
|
@ -712,7 +711,7 @@ void database_fixture::change_fees(
|
|||
new_fees.scale = new_scale;
|
||||
|
||||
chain_parameters new_chain_params = current_chain_params;
|
||||
new_chain_params.current_fees = new_fees;
|
||||
new_chain_params.current_fees = std::make_shared<fee_schedule>(new_fees);
|
||||
|
||||
db.modify(db.get_global_properties(), [&](global_property_object& p) {
|
||||
p.parameters = new_chain_params;
|
||||
|
|
@ -1039,7 +1038,7 @@ void database_fixture::enable_fees()
|
|||
{
|
||||
db.modify(global_property_id_type()(db), [](global_property_object& gpo)
|
||||
{
|
||||
gpo.parameters.current_fees = fee_schedule::get_default();
|
||||
gpo.parameters.current_fees = std::make_shared<fee_schedule>(fee_schedule::get_default());
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
#include <graphene/app/application.hpp>
|
||||
#include <graphene/chain/database.hpp>
|
||||
#include <fc/io/json.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <graphene/chain/operation_history_object.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include <fc/io/fstream.hpp>
|
||||
#include <fc/io/json.hpp>
|
||||
#include <fc/io/stdio.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <graphene/app/api.hpp>
|
||||
#include <graphene/chain/protocol/protocol.hpp>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/uint128.hpp>
|
||||
|
||||
#include <graphene/chain/hardfork.hpp>
|
||||
|
|
@ -334,7 +333,7 @@ BOOST_AUTO_TEST_CASE( cashback_test )
|
|||
upgrade_to_lifetime_member(rog_id);
|
||||
|
||||
BOOST_TEST_MESSAGE("Enable fees");
|
||||
const auto& fees = db.get_global_properties().parameters.current_fees;
|
||||
const auto& fees = *db.get_global_properties().parameters.current_fees;
|
||||
|
||||
#define CustomRegisterActor(actor_name, registrar_name, referrer_name, referrer_rate) \
|
||||
{ \
|
||||
|
|
@ -346,7 +345,7 @@ BOOST_AUTO_TEST_CASE( cashback_test )
|
|||
op.options.memo_key = actor_name ## _private_key.get_public_key(); \
|
||||
op.active = authority(1, public_key_type(actor_name ## _private_key.get_public_key()), 1); \
|
||||
op.owner = op.active; \
|
||||
op.fee = fees->calculate_fee(op); \
|
||||
op.fee = fees.calculate_fee(op); \
|
||||
trx.operations = {op}; \
|
||||
sign( trx, registrar_name ## _private_key ); \
|
||||
actor_name ## _id = PUSH_TX( db, trx ).operation_results.front().get<object_id_type>(); \
|
||||
|
|
@ -372,10 +371,10 @@ BOOST_AUTO_TEST_CASE( cashback_test )
|
|||
CustomAuditActor( pleb ); \
|
||||
}
|
||||
|
||||
int64_t reg_fee = fees->get< account_create_operation >().premium_fee;
|
||||
int64_t xfer_fee = fees->get< transfer_operation >().fee;
|
||||
int64_t upg_an_fee = fees->get< account_upgrade_operation >().membership_annual_fee;
|
||||
int64_t upg_lt_fee = fees->get< account_upgrade_operation >().membership_lifetime_fee;
|
||||
int64_t reg_fee = fees.get< account_create_operation >().premium_fee;
|
||||
int64_t xfer_fee = fees.get< transfer_operation >().fee;
|
||||
int64_t upg_an_fee = fees.get< account_upgrade_operation >().membership_annual_fee;
|
||||
int64_t upg_lt_fee = fees.get< account_upgrade_operation >().membership_lifetime_fee;
|
||||
// all percentages here are cut from whole pie!
|
||||
uint64_t network_pct = 20 * P1;
|
||||
uint64_t lt_pct = 375 * P100 / 1000;
|
||||
|
|
@ -582,7 +581,7 @@ BOOST_AUTO_TEST_CASE( account_create_fee_scaling )
|
|||
auto accounts_per_scale = db.get_global_properties().parameters.accounts_per_fee_scale;
|
||||
db.modify(global_property_id_type()(db), [](global_property_object& gpo)
|
||||
{
|
||||
gpo.parameters.current_fees = fee_schedule::get_default();
|
||||
gpo.parameters.current_fees = std::make_shared<fee_schedule>(fee_schedule::get_default());
|
||||
gpo.parameters.current_fees->get<account_create_operation>().basic_fee = 1;
|
||||
});
|
||||
|
||||
|
|
@ -1004,8 +1003,9 @@ BOOST_AUTO_TEST_CASE( issue_429_test )
|
|||
// make sure the database requires our fee to be nonzero
|
||||
enable_fees();
|
||||
|
||||
auto fees_to_pay = db.get_global_properties().parameters.current_fees->get<asset_create_operation>();
|
||||
|
||||
const auto& fees = *db.get_global_properties().parameters.current_fees;
|
||||
auto fees_to_pay = fees.get<asset_create_operation>();
|
||||
|
||||
{
|
||||
signed_transaction tx;
|
||||
asset_create_operation op;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
#include "../common/database_fixture.hpp"
|
||||
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/crypto/digest.hpp>
|
||||
|
||||
using namespace graphene::app;
|
||||
|
|
|
|||
Loading…
Reference in a new issue