collector

package
v0.19.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2020 License: LGPL-3.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddActivationTxBalanceTransfer

func AddActivationTxBalanceTransfer(c StatsCollector, tx *types.Transaction, amount *big.Int)

func AddBurnTxBurntCoins

func AddBurnTxBurntCoins(c StatsCollector, addr common.Address, tx *types.Transaction)

func AddFeeBurntCoins

func AddFeeBurntCoins(c StatsCollector, addr common.Address, feeAmount *big.Int, burntRate float32,
	tx *types.Transaction)

func AddFinalCommitteeReward

func AddFinalCommitteeReward(c StatsCollector, addr common.Address, balance *big.Int, stake *big.Int)

func AddFlipsReward

func AddFlipsReward(c StatsCollector, addr common.Address, balance *big.Int, stake *big.Int,
	rewardedStrongFlipCids [][]byte, rewardedWeakFlipCids [][]byte)

func AddFoundationPayout

func AddFoundationPayout(c StatsCollector, addr common.Address, balance *big.Int)

func AddInvitationsReward

func AddInvitationsReward(c StatsCollector, addr common.Address, balance *big.Int, stake *big.Int, age uint16,
	txHash *common.Hash, isSavedInviteWinner bool)

func AddInviteBurntCoins

func AddInviteBurntCoins(c StatsCollector, addr common.Address, amount *big.Int, tx *types.Transaction)

func AddKillInviteeTxStakeTransfer

func AddKillInviteeTxStakeTransfer(c StatsCollector, tx *types.Transaction, amount *big.Int)

func AddKillTxStakeTransfer

func AddKillTxStakeTransfer(c StatsCollector, tx *types.Transaction, amount *big.Int)

func AddKilledBurntCoins

func AddKilledBurntCoins(c StatsCollector, addr common.Address, amount *big.Int)

func AddMintedCoins

func AddMintedCoins(c StatsCollector, amount *big.Int)

func AddPenaltyBurntCoins

func AddPenaltyBurntCoins(c StatsCollector, addr common.Address, amount *big.Int)

func AddProposerReward

func AddProposerReward(c StatsCollector, addr common.Address, balance *big.Int, stake *big.Int)

func AddValidationReward

func AddValidationReward(c StatsCollector, addr common.Address, age uint16, balance *big.Int, stake *big.Int)

func AddZeroWalletFund

func AddZeroWalletFund(c StatsCollector, addr common.Address, balance *big.Int)

func AfterAddStake

func AfterAddStake(c StatsCollector, addr common.Address, amount *big.Int)

func AfterBalanceUpdate

func AfterBalanceUpdate(c StatsCollector, addr common.Address, appState *appstate.AppState)

func AfterKillIdentity

func AfterKillIdentity(c StatsCollector, addr common.Address, appState *appstate.AppState)

func AfterSubPenalty

func AfterSubPenalty(c StatsCollector, addr common.Address, amount *big.Int, appState *appstate.AppState)

func BeforeClearPenalty

func BeforeClearPenalty(c StatsCollector, addr common.Address, appState *appstate.AppState)

func BeforeSetPenalty

func BeforeSetPenalty(c StatsCollector, addr common.Address, appState *appstate.AppState)

func SetAuthors

func SetAuthors(c StatsCollector, authors *types.ValidationAuthors)

func SetMinScoreForInvite

func SetMinScoreForInvite(c StatsCollector, score float32)

func SetTotalFlipsReward

func SetTotalFlipsReward(c StatsCollector, amount *big.Int, share *big.Int)

func SetTotalFoundationPayouts

func SetTotalFoundationPayouts(c StatsCollector, amount *big.Int)

func SetTotalInvitationsReward

func SetTotalInvitationsReward(c StatsCollector, amount *big.Int, share *big.Int)

func SetTotalReward

func SetTotalReward(c StatsCollector, amount *big.Int)

func SetTotalValidationReward

func SetTotalValidationReward(c StatsCollector, amount *big.Int, share *big.Int)

func SetTotalZeroWalletFund

func SetTotalZeroWalletFund(c StatsCollector, amount *big.Int)

func SetValidation

func SetValidation(c StatsCollector, validation *statsTypes.ValidationStats)

Types

type StatsCollector

type StatsCollector interface {
	EnableCollecting()
	CompleteCollecting()

	SetValidation(validation *statsTypes.ValidationStats)
	SetMinScoreForInvite(score float32)

	SetAuthors(authors *types.ValidationAuthors)

	SetTotalReward(amount *big.Int)
	SetTotalValidationReward(amount *big.Int, share *big.Int)
	SetTotalFlipsReward(amount *big.Int, share *big.Int)
	SetTotalInvitationsReward(amount *big.Int, share *big.Int)
	SetTotalFoundationPayouts(amount *big.Int)
	SetTotalZeroWalletFund(amount *big.Int)
	AddValidationReward(addr common.Address, age uint16, balance *big.Int, stake *big.Int)
	AddFlipsReward(addr common.Address, balance *big.Int, stake *big.Int, rewardedStrongFlipCids [][]byte,
		rewardedWeakFlipCids [][]byte)
	AddInvitationsReward(addr common.Address, balance *big.Int, stake *big.Int, age uint16, txHash *common.Hash,
		isSavedInviteWinner bool)
	AddFoundationPayout(addr common.Address, balance *big.Int)
	AddZeroWalletFund(addr common.Address, balance *big.Int)

	AddProposerReward(addr common.Address, balance *big.Int, stake *big.Int)
	AddFinalCommitteeReward(addr common.Address, balance *big.Int, stake *big.Int)

	AfterSubPenalty(addr common.Address, amount *big.Int, appState *appstate.AppState)
	BeforeClearPenalty(addr common.Address, appState *appstate.AppState)
	BeforeSetPenalty(addr common.Address, appState *appstate.AppState)

	AfterBalanceUpdate(addr common.Address, appState *appstate.AppState)

	AddMintedCoins(amount *big.Int)
	AddPenaltyBurntCoins(addr common.Address, amount *big.Int)
	AddInviteBurntCoins(addr common.Address, amount *big.Int, tx *types.Transaction)
	AddFeeBurntCoins(addr common.Address, feeAmount *big.Int, burntRate float32, tx *types.Transaction)
	AddKilledBurntCoins(addr common.Address, amount *big.Int)
	AddBurnTxBurntCoins(addr common.Address, tx *types.Transaction)

	AfterKillIdentity(addr common.Address, appState *appstate.AppState)
	AfterAddStake(addr common.Address, amount *big.Int)

	AddActivationTxBalanceTransfer(tx *types.Transaction, amount *big.Int)
	AddKillTxStakeTransfer(tx *types.Transaction, amount *big.Int)
	AddKillInviteeTxStakeTransfer(tx *types.Transaction, amount *big.Int)
}

func NewStatsCollector

func NewStatsCollector() StatsCollector

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL