From a6a7b09b920bd34bd5f9515ae2014fd51e02f56e Mon Sep 17 00:00:00 2001 From: maslenitsa93 Date: Mon, 19 Aug 2019 00:41:38 +0300 Subject: [PATCH 1/2] Fix worker_result_approve_term_sec in API chain properties. #1380 --- libraries/api/chain_api_properties.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/api/chain_api_properties.cpp b/libraries/api/chain_api_properties.cpp index f2b329630a..50245b5d37 100644 --- a/libraries/api/chain_api_properties.cpp +++ b/libraries/api/chain_api_properties.cpp @@ -40,6 +40,7 @@ namespace golos { namespace api { worker_from_vesting_fund_percent = src.worker_from_vesting_fund_percent; worker_from_witness_fund_percent = src.worker_from_witness_fund_percent; worker_techspec_approve_term_sec = src.worker_techspec_approve_term_sec; + worker_result_approve_term_sec = src.worker_result_approve_term_sec; min_vote_author_promote_rate = src.min_vote_author_promote_rate; max_vote_author_promote_rate = src.max_vote_author_promote_rate; } From 7b7109d97dde2d4211a9a43996bf8581070581cc Mon Sep 17 00:00:00 2001 From: maslenitsa93 Date: Mon, 19 Aug 2019 00:50:50 +0300 Subject: [PATCH 2/2] Add author promote percent to votes of API discussion. #1380 --- libraries/api/discussion_helper.cpp | 1 + libraries/api/include/golos/api/vote_state.hpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/api/discussion_helper.cpp b/libraries/api/discussion_helper.cpp index c1fe4b5565..de748652b5 100644 --- a/libraries/api/discussion_helper.cpp +++ b/libraries/api/discussion_helper.cpp @@ -213,6 +213,7 @@ namespace golos { namespace api { vstate.weight = itr->weight; vstate.rshares = itr->vote->rshares; vstate.percent = itr->vote->vote_percent; + vstate.author_promote_percent = itr->vote->author_promote_rate; vstate.time = itr->vote->last_update; fill_reputation_(database(), vo.name, vstate.reputation); result.emplace_back(std::move(vstate)); diff --git a/libraries/api/include/golos/api/vote_state.hpp b/libraries/api/include/golos/api/vote_state.hpp index a8bd3c038d..d8beb04054 100644 --- a/libraries/api/include/golos/api/vote_state.hpp +++ b/libraries/api/include/golos/api/vote_state.hpp @@ -9,6 +9,7 @@ namespace golos { namespace api { uint64_t weight = 0; int64_t rshares = 0; int16_t percent = 0; + int16_t author_promote_percent = 0; fc::optional reputation; time_point_sec time; }; @@ -16,4 +17,4 @@ namespace golos { namespace api { } } // golos::api -FC_REFLECT((golos::api::vote_state), (voter)(weight)(rshares)(percent)(reputation)(time)); \ No newline at end of file +FC_REFLECT((golos::api::vote_state), (voter)(weight)(rshares)(percent)(author_promote_percent)(reputation)(time)); \ No newline at end of file