Scorum
registration_pool.hpp
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace scorum {
7 namespace chain {
8 
9 struct registration_pool_service_i : public base_service_i<registration_pool_object>
10 {
12  using schedule_items_type = std::map<uint8_t /*stage field*/, schedule_item_type /*all other fields*/>;
13 
14  virtual const registration_pool_object&
15  create_pool(const asset& supply, const asset& maximum_bonus, const schedule_items_type& schedule_items)
16  = 0;
17 
18  virtual void decrease_balance(const asset& amount) = 0;
19 
21 };
22 
26 class dbs_registration_pool : public dbs_service_base<registration_pool_service_i>
27 {
28  friend class dbservice_dbs_factory;
29 
30 protected:
31  explicit dbs_registration_pool(database& db);
32 
33 public:
35  create_pool(const asset& supply, const asset& maximum_bonus, const schedule_items_type& schedule_items) override;
36 
37  void decrease_balance(const asset& amount) override;
38 
39  void increase_already_allocated_count() override;
40 };
41 
42 } // namespace chain
43 } // namespace scorum
tracks the blockchain state in an extensible manner
Definition: database.hpp:52
void decrease_balance(const asset &amount) override
const registration_pool_object & create_pool(const asset &supply, const asset &maximum_bonus, const schedule_items_type &schedule_items) override
Definition: asset.cpp:15
virtual const registration_pool_object & create_pool(const asset &supply, const asset &maximum_bonus, const schedule_items_type &schedule_items)=0
std::map< uint8_t, schedule_item_type > schedule_items_type
virtual void decrease_balance(const asset &amount)=0