From da17321ccf40e9631ec14ca08f4787ac7ac9c449 Mon Sep 17 00:00:00 2001 From: Tuan Pham Anh Date: Fri, 10 Aug 2018 16:03:00 +0700 Subject: [PATCH] SBD_SYMBOL removed completely :) --- contrib/config-for-ahnode.ini | 5 +---- contrib/config-for-broadcaster.ini | 3 --- contrib/config-for-docker.ini | 3 --- contrib/fullnode.config.ini | 5 +---- doc/example_config.ini | 3 --- libraries/app/database_api.cpp | 1 - libraries/app/impacted.cpp | 5 ----- libraries/chain/database.cpp | 5 ----- .../include/steemit/chain/global_property_object.hpp | 8 -------- libraries/chain/witness_schedule.cpp | 8 -------- .../account_statistics/account_statistics_plugin.hpp | 8 -------- .../blockchain_statistics_api.cpp | 2 -- .../blockchain_statistics_plugin.cpp | 10 ---------- .../blockchain_statistics_api.hpp | 4 ---- .../blockchain_statistics_plugin.hpp | 4 ---- .../tags/include/steemit/tags/tags_plugin.hpp | 4 ++-- libraries/protocol/get_config.cpp | 2 -- .../protocol/include/steemit/protocol/config.hpp | 3 --- .../protocol/include/steemit/protocol/operations.hpp | 1 - .../include/steemit/protocol/steem_operations.hpp | 5 +---- .../steemit/protocol/steem_virtual_operations.hpp | 10 ---------- libraries/protocol/steem_operations.cpp | 4 ++-- tests/tests/operation_tests.cpp | 12 +----------- tests/tests/serialization_tests.cpp | 9 --------- 24 files changed, 8 insertions(+), 116 deletions(-) diff --git a/contrib/config-for-ahnode.ini b/contrib/config-for-ahnode.ini index 4bf8b68e88..054301e057 100644 --- a/contrib/config-for-ahnode.ini +++ b/contrib/config-for-ahnode.ini @@ -13,7 +13,7 @@ bcd-trigger = [[0,10],[85,300]] # Defines a range of accounts to track as a json pair ["from","to"] [from,to] # track-account-range = -# history-whitelist-ops = transfer_operation transfer_to_vesting_operation withdraw_vesting_operation interest_operation transfer_to_savings_operation transfer_from_savings_operation cancel_transfer_from_savings_operation escrow_transfer_operation escrow_approve_operation escrow_dispute_operation escrow_release_operation claim_reward_balance_operation author_reward_operation curation_reward_operation fill_vesting_withdraw_operation fill_transfer_from_savings_operation delegate_vesting_shares_operation return_vesting_delegation_operation comment_benefactor_reward_operation +# history-whitelist-ops = transfer_operation transfer_to_vesting_operation withdraw_vesting_operation transfer_to_savings_operation transfer_from_savings_operation cancel_transfer_from_savings_operation escrow_transfer_operation escrow_approve_operation escrow_dispute_operation escrow_release_operation claim_reward_balance_operation author_reward_operation curation_reward_operation fill_vesting_withdraw_operation fill_transfer_from_savings_operation delegate_vesting_shares_operation return_vesting_delegation_operation comment_benefactor_reward_operation # Ignore posting operations, only track transfers and account updates # filter-posting-ops = @@ -61,9 +61,6 @@ required-participation = false # Maximum block size (in bytes) to be voted on upon successful POW - Max block size must be between 128 KB and 750 MB # miner-maximum-block-size = -# SBD interest rate to be vote on upon successful POW - Default interest rate is 10% (written as 1000) -# miner-sbd-interest-rate = - # declare an appender named "stderr" that writes messages to the console [log.console_appender.stderr] stream=std_error diff --git a/contrib/config-for-broadcaster.ini b/contrib/config-for-broadcaster.ini index d2e1940d8a..0cea659d4b 100644 --- a/contrib/config-for-broadcaster.ini +++ b/contrib/config-for-broadcaster.ini @@ -89,9 +89,6 @@ required-participation = false # Maximum block size (in bytes) to be voted on upon successful POW - Max block size must be between 128 KB and 750 MB # miner-maximum-block-size = -# SBD interest rate to be vote on upon successful POW - Default interest rate is 10% (written as 1000) -# miner-sbd-interest-rate = - # declare an appender named "stderr" that writes messages to the console [log.console_appender.stderr] stream=std_error diff --git a/contrib/config-for-docker.ini b/contrib/config-for-docker.ini index 1c927c8c46..eaa4b9c63c 100644 --- a/contrib/config-for-docker.ini +++ b/contrib/config-for-docker.ini @@ -89,9 +89,6 @@ required-participation = false # Maximum block size (in bytes) to be voted on upon successful POW - Max block size must be between 128 KB and 750 MB # miner-maximum-block-size = -# SBD interest rate to be vote on upon successful POW - Default interest rate is 10% (written as 1000) -# miner-sbd-interest-rate = - # declare an appender named "stderr" that writes messages to the console [log.console_appender.stderr] stream=std_error diff --git a/contrib/fullnode.config.ini b/contrib/fullnode.config.ini index a3fa132e7a..6dd80480a0 100644 --- a/contrib/fullnode.config.ini +++ b/contrib/fullnode.config.ini @@ -13,7 +13,7 @@ bcd-trigger = [[0,10],[85,300]] # Defines a range of accounts to track as a json pair ["from","to"] [from,to] # track-account-range = -# history-whitelist-ops = transfer_operation transfer_to_vesting_operation withdraw_vesting_operation interest_operation transfer_to_savings_operation transfer_from_savings_operation cancel_transfer_from_savings_operation escrow_transfer_operation escrow_approve_operation escrow_dispute_operation escrow_release_operation claim_reward_balance_operation author_reward_operation curation_reward_operation fill_vesting_withdraw_operation fill_transfer_from_savings_operation delegate_vesting_shares_operation return_vesting_delegation_operation comment_benefactor_reward_operation +# history-whitelist-ops = transfer_operation transfer_to_vesting_operation withdraw_vesting_operation transfer_to_savings_operation transfer_from_savings_operation cancel_transfer_from_savings_operation escrow_transfer_operation escrow_approve_operation escrow_dispute_operation escrow_release_operation claim_reward_balance_operation author_reward_operation curation_reward_operation fill_vesting_withdraw_operation fill_transfer_from_savings_operation delegate_vesting_shares_operation return_vesting_delegation_operation comment_benefactor_reward_operation # Ignore posting operations, only track transfers and account updates # filter-posting-ops = @@ -61,9 +61,6 @@ required-participation = false # Maximum block size (in bytes) to be voted on upon successful POW - Max block size must be between 128 KB and 750 MB # miner-maximum-block-size = -# SBD interest rate to be vote on upon successful POW - Default interest rate is 10% (written as 1000) -# miner-sbd-interest-rate = - # declare an appender named "stderr" that writes messages to the console [log.console_appender.stderr] stream=std_error diff --git a/doc/example_config.ini b/doc/example_config.ini index dadf2cd0a7..2e772f09e5 100644 --- a/doc/example_config.ini +++ b/doc/example_config.ini @@ -89,9 +89,6 @@ track-account-range = ["exchange_account", "exchange_account"] # Maximum block size (in bytes) to be voted on upon successful POW - Max block size must be between 128 KB and 750 MB # miner-maximum-block-size = -# SBD interest rate to be vote on upon successful POW - Default interest rate is 10% (written as 1000) -# miner-sbd-interest-rate = - # declare an appender named "stderr" that writes messages to the console [log.console_appender.stderr] stream=std_error diff --git a/libraries/app/database_api.cpp b/libraries/app/database_api.cpp index f35ef5fa50..08d3787800 100755 --- a/libraries/app/database_api.cpp +++ b/libraries/app/database_api.cpp @@ -1811,7 +1811,6 @@ state database_api::get_state( string path )const switch( item.second.op.which() ) { case operation::tag::value: case operation::tag::value: - case operation::tag::value: case operation::tag::value: case operation::tag::value: case operation::tag::value: diff --git a/libraries/app/impacted.cpp b/libraries/app/impacted.cpp index d320d15a56..61382e98e3 100644 --- a/libraries/app/impacted.cpp +++ b/libraries/app/impacted.cpp @@ -189,11 +189,6 @@ struct get_impacted_account_visitor _impacted.insert( op.curator ); } - void operator()( const interest_operation& op ) - { - _impacted.insert( op.owner ); - } - void operator()( const fill_vesting_withdraw_operation& op ) { _impacted.insert( op.from_account ); diff --git a/libraries/chain/database.cpp b/libraries/chain/database.cpp index 1725c58893..ad976fc41d 100644 --- a/libraries/chain/database.cpp +++ b/libraries/chain/database.cpp @@ -2863,11 +2863,6 @@ void database::adjust_supply( const asset& delta, bool adjust_vesting ) assert( props.current_supply.amount.value >= 0 ); break; } -// case SBD_SYMBOL: -// props.current_sbd_supply += delta; -// props.virtual_supply = props.current_sbd_supply * get_feed_history().current_median_history + props.current_supply; -// assert( props.current_sbd_supply.amount.value >= 0 ); -// break; default: FC_ASSERT( false, "invalid symbol" ); } diff --git a/libraries/chain/include/steemit/chain/global_property_object.hpp b/libraries/chain/include/steemit/chain/global_property_object.hpp index 03508e5a14..a0941f180f 100644 --- a/libraries/chain/include/steemit/chain/global_property_object.hpp +++ b/libraries/chain/include/steemit/chain/global_property_object.hpp @@ -47,7 +47,6 @@ namespace steemit { namespace chain { asset virtual_supply = asset( 0, STEEM_SYMBOL ); asset current_supply = asset( 0, STEEM_SYMBOL ); asset confidential_supply = asset( 0, STEEM_SYMBOL ); ///< total asset held in confidential balances - asset confidential_sbd_supply = asset( 0, SBD_SYMBOL ); ///< total asset held in confidential balances asset total_vesting_fund_steem = asset( 0, STEEM_SYMBOL ); asset total_vesting_shares = asset( 0, VESTS_SYMBOL ); asset total_reward_fund_steem = asset( 0, STEEM_SYMBOL ); @@ -73,11 +72,6 @@ namespace steemit { namespace chain { total_vesting_fund_steem + pending_rewarded_vesting_steem ); } - /** - * This property defines the interest rate that SBD deposits receive. - */ - uint16_t sbd_interest_rate = 0; - uint16_t sbd_print_rate = STEEMIT_100_PERCENT; /** @@ -134,14 +128,12 @@ FC_REFLECT( steemit::chain::dynamic_global_property_object, (virtual_supply) (current_supply) (confidential_supply) - (confidential_sbd_supply) (total_vesting_fund_steem) (total_vesting_shares) (total_reward_fund_steem) (total_reward_shares2) (pending_rewarded_vesting_shares) (pending_rewarded_vesting_steem) - (sbd_interest_rate) (sbd_print_rate) (maximum_block_size) (current_aslot) diff --git a/libraries/chain/witness_schedule.cpp b/libraries/chain/witness_schedule.cpp index 7827f39479..a4e2fbdff1 100644 --- a/libraries/chain/witness_schedule.cpp +++ b/libraries/chain/witness_schedule.cpp @@ -52,24 +52,16 @@ void update_median_witness_props( database& db ) } ); uint32_t median_maximum_block_size = active[active.size()/2]->props.maximum_block_size; - /// sort them by sbd_interest_rate - std::sort( active.begin(), active.end(), [&]( const witness_object* a, const witness_object* b ) - { - return a->props.sbd_interest_rate < b->props.sbd_interest_rate; - } ); - uint16_t median_sbd_interest_rate = active[active.size()/2]->props.sbd_interest_rate; db.modify( wso, [&]( witness_schedule_object& _wso ) { _wso.median_props.account_creation_fee = median_account_creation_fee; _wso.median_props.maximum_block_size = median_maximum_block_size; - _wso.median_props.sbd_interest_rate = median_sbd_interest_rate; } ); db.modify( db.get_dynamic_global_properties(), [&]( dynamic_global_property_object& _dgpo ) { _dgpo.maximum_block_size = median_maximum_block_size; - _dgpo.sbd_interest_rate = median_sbd_interest_rate; } ); } diff --git a/libraries/plugins/account_statistics/include/steemit/account_statistics/account_statistics_plugin.hpp b/libraries/plugins/account_statistics/include/steemit/account_statistics/account_statistics_plugin.hpp index 14ba314b66..a37b816f06 100644 --- a/libraries/plugins/account_statistics/include/steemit/account_statistics/account_statistics_plugin.hpp +++ b/libraries/plugins/account_statistics/include/steemit/account_statistics/account_statistics_plugin.hpp @@ -75,10 +75,6 @@ struct account_stats_bucket_object : public object< account_stats_bucket_object_ uint32_t transfers_from = 0; ///< Account to account transfers from this account share_type steem_sent = 0; ///< STEEM sent from this account share_type steem_received = 0; ///< STEEM received by this account - share_type sbd_sent = 0; ///< SBD sent from this account - share_type sbd_received = 0; ///< SBD received by this account - uint32_t sbd_interest_payments = 0; ///< Number of times interest was paid to SBD - share_type sbd_paid_as_interest = 0; ///< Amount of SBD paid as interest uint32_t transfers_to_vesting = 0; ///< Transfers to vesting by this account. Note: Transfer to vesting from A to B counts as a transfer from A to B followed by a vesting deposit by B. share_type steem_vested = 0; ///< STEEM vested by the account share_type new_vests = 0; ///< New VESTS by vesting transfers @@ -178,10 +174,6 @@ FC_REFLECT( steemit::account_statistics::account_stats_bucket_object, (transfers_from) (steem_sent) (steem_received) - (sbd_sent) - (sbd_received) - (sbd_interest_payments) - (sbd_paid_as_interest) (transfers_to_vesting) (steem_vested) (new_vests) diff --git a/libraries/plugins/blockchain_statistics/blockchain_statistics_api.cpp b/libraries/plugins/blockchain_statistics/blockchain_statistics_api.cpp index d5d2595c93..746379809b 100644 --- a/libraries/plugins/blockchain_statistics/blockchain_statistics_api.cpp +++ b/libraries/plugins/blockchain_statistics/blockchain_statistics_api.cpp @@ -105,8 +105,6 @@ statistics& statistics::operator +=( const bucket_object& b ) this->transactions += b.transactions; this->transfers += b.transfers; this->steem_transferred += b.steem_transferred; - this->sbd_transferred += b.sbd_transferred; - this->sbd_paid_as_interest += b.sbd_paid_as_interest; this->accounts_created += b.paid_accounts_created + b.mined_accounts_created; this->paid_accounts_created += b.paid_accounts_created; this->mined_accounts_created += b.mined_accounts_created; diff --git a/libraries/plugins/blockchain_statistics/blockchain_statistics_plugin.cpp b/libraries/plugins/blockchain_statistics/blockchain_statistics_plugin.cpp index fc1ab1c8b1..18a9fe03f1 100644 --- a/libraries/plugins/blockchain_statistics/blockchain_statistics_plugin.cpp +++ b/libraries/plugins/blockchain_statistics/blockchain_statistics_plugin.cpp @@ -55,16 +55,6 @@ struct operation_process if( op.amount.symbol == STEEM_SYMBOL ) b.steem_transferred += op.amount.amount; - else - b.sbd_transferred += op.amount.amount; - }); - } - - void operator()( const interest_operation& op )const - { - _db.modify( _bucket, [&]( bucket_object& b ) - { - b.sbd_paid_as_interest += op.interest.amount; }); } diff --git a/libraries/plugins/blockchain_statistics/include/steemit/blockchain_statistics/blockchain_statistics_api.hpp b/libraries/plugins/blockchain_statistics/include/steemit/blockchain_statistics/blockchain_statistics_api.hpp index 9fff852e73..6356e1505b 100644 --- a/libraries/plugins/blockchain_statistics/include/steemit/blockchain_statistics/blockchain_statistics_api.hpp +++ b/libraries/plugins/blockchain_statistics/include/steemit/blockchain_statistics/blockchain_statistics_api.hpp @@ -23,8 +23,6 @@ struct statistics uint32_t transactions = 0; ///< Transactions processed uint32_t transfers = 0; ///< Account to account transfers share_type steem_transferred = 0; ///< STEEM transferred from account to account - share_type sbd_transferred = 0; ///< SBD transferred from account to account - share_type sbd_paid_as_interest = 0; ///< SBD paid as interest uint32_t accounts_created = 0; ///< Total accounts created uint32_t paid_accounts_created = 0; ///< Accounts created with fee uint32_t mined_accounts_created = 0; ///< Accounts mined for free @@ -104,8 +102,6 @@ FC_REFLECT( steemit::blockchain_statistics::statistics, (transactions) (transfers) (steem_transferred) - (sbd_transferred) - (sbd_paid_as_interest) (accounts_created) (paid_accounts_created) (mined_accounts_created) diff --git a/libraries/plugins/blockchain_statistics/include/steemit/blockchain_statistics/blockchain_statistics_plugin.hpp b/libraries/plugins/blockchain_statistics/include/steemit/blockchain_statistics/blockchain_statistics_plugin.hpp index f33486cadb..f5d40c4a97 100644 --- a/libraries/plugins/blockchain_statistics/include/steemit/blockchain_statistics/blockchain_statistics_plugin.hpp +++ b/libraries/plugins/blockchain_statistics/include/steemit/blockchain_statistics/blockchain_statistics_plugin.hpp @@ -77,8 +77,6 @@ struct bucket_object : public object< bucket_object_type, bucket_object > uint32_t transactions = 0; ///< Transactions processed uint32_t transfers = 0; ///< Account to account transfers share_type steem_transferred = 0; ///< STEEM transferred from account to account - share_type sbd_transferred = 0; ///< SBD transferred from account to account - share_type sbd_paid_as_interest = 0; ///< SBD paid as interest uint32_t paid_accounts_created = 0; ///< Accounts created with fee uint32_t mined_accounts_created = 0; ///< Accounts mined for free uint32_t root_comments = 0; ///< Top level root comments @@ -136,8 +134,6 @@ FC_REFLECT( steemit::blockchain_statistics::bucket_object, (transactions) (transfers) (steem_transferred) - (sbd_transferred) - (sbd_paid_as_interest) (paid_accounts_created) (mined_accounts_created) (root_comments) diff --git a/libraries/plugins/tags/include/steemit/tags/tags_plugin.hpp b/libraries/plugins/tags/include/steemit/tags/tags_plugin.hpp index ab3e8fe7af..9bdb96eb06 100644 --- a/libraries/plugins/tags/include/steemit/tags/tags_plugin.hpp +++ b/libraries/plugins/tags/include/steemit/tags/tags_plugin.hpp @@ -261,7 +261,7 @@ class tag_stats_object : public object< tag_stats_object_type, tag_stats_object id_type id; tag_name_type tag; - asset total_payout = asset( 0, SBD_SYMBOL ); + asset total_payout = asset( 0, STEEM_SYMBOL ); int32_t net_votes = 0; uint32_t top_posts = 0; uint32_t comments = 0; @@ -401,7 +401,7 @@ class author_tag_stats_object : public object< author_tag_stats_object_type, aut id_type id; account_id_type author; tag_name_type tag; - asset total_rewards = asset( 0, SBD_SYMBOL ); + asset total_rewards = asset( 0, STEEM_SYMBOL ); uint32_t total_posts = 0; }; typedef oid< author_tag_stats_object > author_tag_stats_id_type; diff --git a/libraries/protocol/get_config.cpp b/libraries/protocol/get_config.cpp index 37efe2528b..2773147143 100644 --- a/libraries/protocol/get_config.cpp +++ b/libraries/protocol/get_config.cpp @@ -16,7 +16,6 @@ fc::variant_object get_config() result[ "IS_TEST_NET" ] = false; #endif - result["SBD_SYMBOL"] = SBD_SYMBOL; result["STEEMIT_100_PERCENT"] = STEEMIT_100_PERCENT; result["STEEMIT_1_PERCENT"] = STEEMIT_1_PERCENT; result["STEEMIT_1_TENTH_PERCENT"] = STEEMIT_1_TENTH_PERCENT; @@ -41,7 +40,6 @@ fc::variant_object get_config() result["STEEMIT_CREATE_ACCOUNT_DELEGATION_RATIO"] = STEEMIT_CREATE_ACCOUNT_DELEGATION_RATIO; result["STEEMIT_CREATE_ACCOUNT_DELEGATION_TIME"] = STEEMIT_CREATE_ACCOUNT_DELEGATION_TIME; result["STEEMIT_CREATE_ACCOUNT_WITH_STEEM_MODIFIER"] = STEEMIT_CREATE_ACCOUNT_WITH_STEEM_MODIFIER; - result["STEEMIT_DEFAULT_SBD_INTEREST_RATE"] = STEEMIT_DEFAULT_SBD_INTEREST_RATE; result["STEEMIT_FREE_TRANSACTIONS_WITH_NEW_ACCOUNT"] = STEEMIT_FREE_TRANSACTIONS_WITH_NEW_ACCOUNT; result["STEEMIT_GENESIS_TIME"] = STEEMIT_GENESIS_TIME; result["STEEMIT_HARDFORK_REQUIRED_WITNESSES"] = STEEMIT_HARDFORK_REQUIRED_WITNESSES; diff --git a/libraries/protocol/include/steemit/protocol/config.hpp b/libraries/protocol/include/steemit/protocol/config.hpp index b0e476efcc..272a954301 100644 --- a/libraries/protocol/include/steemit/protocol/config.hpp +++ b/libraries/protocol/include/steemit/protocol/config.hpp @@ -13,7 +13,6 @@ #define VESTS_SYMBOL (uint64_t(6) | (uint64_t('V') << 8) | (uint64_t('E') << 16) | (uint64_t('S') << 24) | (uint64_t('T') << 32) | (uint64_t('S') << 40)) ///< VESTS with 6 digits of precision #define STEEM_SYMBOL (uint64_t(3) | (uint64_t('T') << 8) | (uint64_t('E') << 16) | (uint64_t('S') << 24) | (uint64_t('T') << 32) | (uint64_t('S') << 40)) ///< TESTS with 3 digits of precision -#define SBD_SYMBOL (uint64_t(3) | (uint64_t('T') << 8) | (uint64_t('B') << 16) | (uint64_t('D') << 24) ) ///< Test Backed Dollars with 3 digits of precision #define STMD_SYMBOL (uint64_t(3) | (uint64_t('T') << 8) | (uint64_t('S') << 16) | (uint64_t('T') << 24) | (uint64_t('D') << 32) ) ///< Test Dollars with 3 digits of precision #define STEEMIT_SYMBOL "TEST" @@ -49,7 +48,6 @@ #define STEEMIT_CHAIN_ID (fc::sha256::hash("vit")) #define VESTS_SYMBOL (uint64_t(6) | (uint64_t('V') << 8) | (uint64_t('E') << 16) | (uint64_t('S') << 24) | (uint64_t('T') << 32) | (uint64_t('S') << 40)) ///< VESTS with 6 digits of precision #define STEEM_SYMBOL (uint64_t(3) | (uint64_t('V') << 8) | (uint64_t('I') << 16) | (uint64_t('T') << 24) ) ///< VIT with 3 digits of precision -#define SBD_SYMBOL (uint64_t(3) | (uint64_t('V') << 8) | (uint64_t('B') << 16) | (uint64_t('D') << 24) ) ///< VIT Backed Dollars with 3 digits of precision #define STMD_SYMBOL (uint64_t(3) | (uint64_t('V') << 8) | (uint64_t('I') << 16) | (uint64_t('T') << 24) | (uint64_t('D') << 32) ) ///< VIT Dollars with 3 digits of precision #define STEEMIT_SYMBOL "VIT" #define STEEMIT_ADDRESS_PREFIX "VIT" @@ -123,7 +121,6 @@ #define STEEMIT_100_PERCENT 10000 #define STEEMIT_1_PERCENT (STEEMIT_100_PERCENT/100) #define STEEMIT_1_TENTH_PERCENT (STEEMIT_100_PERCENT/1000) -#define STEEMIT_DEFAULT_SBD_INTEREST_RATE (0*STEEMIT_1_PERCENT) ///< 10% APR #define STEEMIT_INFLATION_RATE_START_PERCENT (978) #define STEEMIT_INFLATION_RATE_STOP_PERCENT (95) // 0.95% diff --git a/libraries/protocol/include/steemit/protocol/operations.hpp b/libraries/protocol/include/steemit/protocol/operations.hpp index 8ba3fd501f..610b879e74 100644 --- a/libraries/protocol/include/steemit/protocol/operations.hpp +++ b/libraries/protocol/include/steemit/protocol/operations.hpp @@ -54,7 +54,6 @@ namespace steemit { namespace protocol { author_reward_operation, curation_reward_operation, comment_reward_operation, - interest_operation, fill_vesting_withdraw_operation, shutdown_witness_operation, fill_transfer_from_savings_operation, diff --git a/libraries/protocol/include/steemit/protocol/steem_operations.hpp b/libraries/protocol/include/steemit/protocol/steem_operations.hpp index abaa16d608..7096976051 100644 --- a/libraries/protocol/include/steemit/protocol/steem_operations.hpp +++ b/libraries/protocol/include/steemit/protocol/steem_operations.hpp @@ -383,14 +383,11 @@ namespace steemit { namespace protocol { * to tune rate limiting and capacity */ uint32_t maximum_block_size = STEEMIT_MIN_BLOCK_SIZE_LIMIT * 2; - uint16_t sbd_interest_rate = STEEMIT_DEFAULT_SBD_INTEREST_RATE; void validate()const { FC_ASSERT( account_creation_fee.amount >= STEEMIT_MIN_ACCOUNT_CREATION_FEE); FC_ASSERT( maximum_block_size >= STEEMIT_MIN_BLOCK_SIZE_LIMIT); - FC_ASSERT( sbd_interest_rate >= 0 ); - FC_ASSERT( sbd_interest_rate <= STEEMIT_100_PERCENT ); } }; @@ -747,7 +744,7 @@ FC_REFLECT( steemit::protocol::cancel_transfer_from_savings_operation, (from)(re FC_REFLECT( steemit::protocol::report_over_production_operation, (reporter)(first_block)(second_block) ) FC_REFLECT( steemit::protocol::pow2, (input)(pow_summary) ) FC_REFLECT( steemit::protocol::pow2_input, (worker_account)(prev_block)(nonce) ) -FC_REFLECT( steemit::protocol::chain_properties, (account_creation_fee)(maximum_block_size)(sbd_interest_rate) ); +FC_REFLECT( steemit::protocol::chain_properties, (account_creation_fee)(maximum_block_size)); FC_REFLECT( steemit::protocol::account_create_operation, (fee) (creator) diff --git a/libraries/protocol/include/steemit/protocol/steem_virtual_operations.hpp b/libraries/protocol/include/steemit/protocol/steem_virtual_operations.hpp index e8779ef532..20d359615c 100644 --- a/libraries/protocol/include/steemit/protocol/steem_virtual_operations.hpp +++ b/libraries/protocol/include/steemit/protocol/steem_virtual_operations.hpp @@ -42,15 +42,6 @@ namespace steemit { namespace protocol { asset payout; }; - struct interest_operation : public virtual_operation - { - interest_operation( const string& o = "", const asset& i = asset(0,SBD_SYMBOL) ) - :owner(o),interest(i){} - - account_name_type owner; - asset interest; - }; - struct fill_vesting_withdraw_operation : public virtual_operation { fill_vesting_withdraw_operation(){} @@ -138,7 +129,6 @@ namespace steemit { namespace protocol { FC_REFLECT( steemit::protocol::author_reward_operation, (author)(permlink)(vesting_payout) ) FC_REFLECT( steemit::protocol::curation_reward_operation, (curator)(reward)(comment_author)(comment_permlink) ) FC_REFLECT( steemit::protocol::comment_reward_operation, (author)(permlink)(payout) ) -FC_REFLECT( steemit::protocol::interest_operation, (owner)(interest) ) FC_REFLECT( steemit::protocol::fill_vesting_withdraw_operation, (from_account)(to_account)(withdrawn)(deposited) ) FC_REFLECT( steemit::protocol::shutdown_witness_operation, (owner) ) FC_REFLECT( steemit::protocol::fill_transfer_from_savings_operation, (from)(to)(amount)(request_id)(memo) ) diff --git a/libraries/protocol/steem_operations.cpp b/libraries/protocol/steem_operations.cpp index d195c38edf..1e4c844412 100644 --- a/libraries/protocol/steem_operations.cpp +++ b/libraries/protocol/steem_operations.cpp @@ -315,7 +315,7 @@ namespace steemit { namespace protocol { validate_account_name( from ); validate_account_name( to ); FC_ASSERT( amount.amount > 0 ); - FC_ASSERT( amount.symbol == STEEM_SYMBOL || amount.symbol == SBD_SYMBOL ); + FC_ASSERT( amount.symbol == STEEM_SYMBOL ); FC_ASSERT( memo.size() < STEEMIT_MAX_MEMO_SIZE, "Memo is too large" ); FC_ASSERT( fc::is_utf8( memo ), "Memo is not UTF8" ); } @@ -323,7 +323,7 @@ namespace steemit { namespace protocol { validate_account_name( from ); validate_account_name( to ); FC_ASSERT( amount.amount > 0 ); - FC_ASSERT( amount.symbol == STEEM_SYMBOL || amount.symbol == SBD_SYMBOL ); + FC_ASSERT( amount.symbol == STEEM_SYMBOL ); FC_ASSERT( memo.size() < STEEMIT_MAX_MEMO_SIZE, "Memo is too large" ); FC_ASSERT( fc::is_utf8( memo ), "Memo is not UTF8" ); } diff --git a/tests/tests/operation_tests.cpp b/tests/tests/operation_tests.cpp index ff4d97d1ce..00eaee1cd7 100644 --- a/tests/tests/operation_tests.cpp +++ b/tests/tests/operation_tests.cpp @@ -2569,7 +2569,7 @@ BOOST_AUTO_TEST_CASE( escrow_transfer_validate ) op.escrow_expiration = db.head_block_time() + 200; BOOST_TEST_MESSAGE( "--- failure when steem symbol != STEEM" ); - op.steem_amount.symbol = SBD_SYMBOL; + op.steem_amount.symbol = VESTS_SYMBOL; STEEMIT_REQUIRE_THROW( op.validate(), fc::exception ); BOOST_TEST_MESSAGE( "--- failure when fee symbol != STEEM" ); @@ -3876,11 +3876,6 @@ BOOST_AUTO_TEST_CASE( transfer_to_savings_validate ) STEEMIT_REQUIRE_THROW( op.validate(), fc::exception ); - BOOST_TEST_MESSAGE( "success when amount is SBD" ); - op.amount = ASSET( "1.000 TBD" ); - op.validate(); - - BOOST_TEST_MESSAGE( "success when amount is STEEM" ); op.amount = ASSET( "1.000 TESTS" ); op.validate(); @@ -4025,11 +4020,6 @@ BOOST_AUTO_TEST_CASE( transfer_from_savings_validate ) STEEMIT_REQUIRE_THROW( op.validate(), fc::exception ); - BOOST_TEST_MESSAGE( "success when amount is SBD" ); - op.amount = ASSET( "1.000 TBD" ); - op.validate(); - - BOOST_TEST_MESSAGE( "success when amount is STEEM" ); op.amount = ASSET( "1.000 TESTS" ); op.validate(); diff --git a/tests/tests/serialization_tests.cpp b/tests/tests/serialization_tests.cpp index 6205ab295f..7bebd10fd4 100644 --- a/tests/tests/serialization_tests.cpp +++ b/tests/tests/serialization_tests.cpp @@ -120,7 +120,6 @@ BOOST_AUTO_TEST_CASE( asset_test ) BOOST_TEST_MESSAGE( "Asset Test" ); asset steem = asset::from_string( "123.456 TESTS" ); - asset sbd = asset::from_string( "654.321 TBD" ); asset tmp = asset::from_string( "0.456 TESTS" ); BOOST_CHECK_EQUAL( tmp.amount.value, 456 ); tmp = asset::from_string( "0.056 TESTS" ); @@ -135,14 +134,6 @@ BOOST_AUTO_TEST_CASE( asset_test ) BOOST_CHECK_EQUAL( asset(50, STEEM_SYMBOL).to_string(), "0.050 TESTS" ); BOOST_CHECK_EQUAL( asset(50000, STEEM_SYMBOL).to_string(), "50.000 TESTS" ); - BOOST_CHECK( std::abs( sbd.to_real() - 654.321 ) < 0.0005 ); - BOOST_CHECK_EQUAL( sbd.amount.value, 654321 ); - BOOST_CHECK_EQUAL( sbd.decimals(), 3 ); - BOOST_CHECK_EQUAL( sbd.symbol_name(), "TBD" ); - BOOST_CHECK_EQUAL( sbd.to_string(), "654.321 TBD" ); - BOOST_CHECK_EQUAL( sbd.symbol, SBD_SYMBOL); - BOOST_CHECK_EQUAL( asset(50, SBD_SYMBOL).to_string(), "0.050 TBD" ); - BOOST_CHECK_EQUAL( asset(50000, SBD_SYMBOL).to_string(), "50.000 TBD" ); BOOST_CHECK_THROW( steem.set_decimals(100), fc::exception ); char* steem_sy = (char*) &steem.symbol;