Skip to content

Commit

Permalink
move budget_record struct to db_maint
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Aug 29, 2018
1 parent 53184ba commit 9a4e745
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 74 deletions.
28 changes: 27 additions & 1 deletion libraries/chain/db_maint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

#include <graphene/chain/account_object.hpp>
#include <graphene/chain/asset_object.hpp>
#include <graphene/chain/budget_record_object.hpp>
#include <graphene/chain/buyback_object.hpp>
#include <graphene/chain/chain_property_object.hpp>
#include <graphene/chain/committee_member_object.hpp>
Expand Down Expand Up @@ -132,6 +131,33 @@ struct worker_pay_visitor
}
};

/// @brief A budget record struct to be used in initialize_budget_record and process_budget
struct budget_record
{
uint64_t time_since_last_budget = 0;

// sources of budget
share_type from_initial_reserve = 0;
share_type from_accumulated_fees = 0;
share_type from_unused_witness_budget = 0;

// witness budget requested by the committee
share_type requested_witness_budget = 0;

// funds that can be released from reserve at maximum rate
share_type total_budget = 0;

// sinks of budget, should sum up to total_budget
share_type witness_budget = 0;
share_type worker_budget = 0;

// unused budget
share_type leftover_worker_funds = 0;

// change in supply due to budget operations
share_type supply_delta = 0;
};

void database::update_worker_votes()
{
const auto& idx = get_index_type<worker_index>().indices().get<by_account>();
Expand Down
73 changes: 0 additions & 73 deletions libraries/chain/include/graphene/chain/budget_record_object.hpp

This file was deleted.

0 comments on commit 9a4e745

Please sign in to comment.