veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
altintegration::PopRewardsCalculator Struct Referenceabstract

Detailed Description

Invariant
does not modify any on-disk state.

Definition at line 17 of file poprewards_calculator.hpp.

#include <poprewards_calculator.hpp>

+ Inheritance diagram for altintegration::PopRewardsCalculator:
+ Collaboration diagram for altintegration::PopRewardsCalculator:

Public Member Functions

virtual bool getPopPayout (const AltBlockTree::hash_t &tip, PopPayouts &rewards, ValidationState &state)=0
 Calculate POP rewards for miners. More...
 

Member Function Documentation

◆ getPopPayout()

virtual bool altintegration::PopRewardsCalculator::getPopPayout ( const AltBlockTree::hash_t &  tip,
PopPayouts rewards,
ValidationState state 
)
pure virtual

Rewards are calculated for the endorsed block which is PopPayoutDelay blocks behind the tip.

Parameters
tiplast block of the active chain. Next block should contain POP payout calculated with this getPopPayout() call.
[out]rewardsPopPayouts map with miner address as a key and reward amount as a value.
[out]statevalidation state.
Returns
true if rewards are calculated properly; false otherwise.

Implemented in altintegration::DefaultPopRewardsCalculator.


The documentation for this struct was generated from the following file: