15 if (
nullptr == find_by<by_account_id>(account_id))
17 return create([&](account_blogging_statistic_object& stat) { stat.account = account_id; });
21 return get_by<by_account_id>(account_id);
24 FC_CAPTURE_AND_RETHROW((account_id))
29 return find_by<by_account_id>(account_id);
34 update(stat, [&](account_blogging_statistic_object& a) { a.post_count++; });
39 update(stat, [&](account_blogging_statistic_object& a) { a.comment_count++; });
44 update(stat, [&](account_blogging_statistic_object& a) { a.vote_count++; });
52 update(stat, [&](account_blogging_statistic_object& a) { a.posting_rewards_scr += reward; });
56 update(stat, [&](account_blogging_statistic_object& a) { a.posting_rewards_sp += reward; });
65 update(stat, [&](account_blogging_statistic_object& a) { a.curation_rewards_scr += reward; });
69 update(stat, [&](account_blogging_statistic_object& a) { a.curation_rewards_sp += reward; });
tracks the blockchain state in an extensible manner
void increase_posting_rewards(const account_blogging_statistic_object &stat, const asset &amount) override
void add_post(const account_blogging_statistic_object &stat) override
void add_vote(const account_blogging_statistic_object &stat) override
const account_blogging_statistic_object & obtain(const account_id_type &account_id) override
dbs_account_blogging_statistic(database &db)
const account_blogging_statistic_object * find(const account_id_type &account_id) const override
void increase_curation_rewards(const account_blogging_statistic_object &stat, const asset &amount) override
void add_comment(const account_blogging_statistic_object &stat) override
virtual const object_type & create(const modifier_type &modifier) override
virtual void update(const modifier_type &modifier) override
asset_symbol_type symbol() const