Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Add some not-enough info to API #1381

Open
wants to merge 2 commits into
base: golos-v0.22.0
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions libraries/api/chain_api_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions libraries/api/discussion_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
3 changes: 2 additions & 1 deletion libraries/api/include/golos/api/vote_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ namespace golos { namespace api {
uint64_t weight = 0;
int64_t rshares = 0;
int16_t percent = 0;
int16_t author_promote_percent = 0;
fc::optional<share_type> reputation;
time_point_sec time;
};

} } // golos::api


FC_REFLECT((golos::api::vote_state), (voter)(weight)(rshares)(percent)(reputation)(time));
FC_REFLECT((golos::api::vote_state), (voter)(weight)(rshares)(percent)(author_promote_percent)(reputation)(time));