Documentation ¶
Index ¶
- type EconomicsData
- func (ed *EconomicsData) BurnAddress() string
- func (ed *EconomicsData) BurnPercentage() float64
- func (ed *EconomicsData) CheckValidityTxValues(tx process.TransactionWithFeeHandler) error
- func (ed *EconomicsData) CommunityAddress() string
- func (ed *EconomicsData) CommunityPercentage() float64
- func (ed *EconomicsData) ComputeFee(tx process.TransactionWithFeeHandler) *big.Int
- func (ed *EconomicsData) ComputeGasLimit(tx process.TransactionWithFeeHandler) uint64
- func (ed *EconomicsData) IsInterfaceNil() bool
- func (ed *EconomicsData) LeaderPercentage() float64
- func (ed *EconomicsData) MaxGasLimitPerBlock() uint64
- func (ed *EconomicsData) RewardsValue() *big.Int
- func (ed *EconomicsData) StakeValue() *big.Int
- func (ed *EconomicsData) UnBoundPeriod() uint64
- type TestEconomicsData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EconomicsData ¶
type EconomicsData struct {
// contains filtered or unexported fields
}
EconomicsData will store information about economics
func NewEconomicsData ¶
func NewEconomicsData(economics *config.ConfigEconomics) (*EconomicsData, error)
NewEconomicsData will create and object with information about economics parameters
func (*EconomicsData) BurnAddress ¶ added in v1.0.20
func (ed *EconomicsData) BurnAddress() string
BurnAddress will return burn address
func (*EconomicsData) BurnPercentage ¶ added in v1.0.20
func (ed *EconomicsData) BurnPercentage() float64
BurnPercentage will return burn percentage
func (*EconomicsData) CheckValidityTxValues ¶
func (ed *EconomicsData) CheckValidityTxValues(tx process.TransactionWithFeeHandler) error
CheckValidityTxValues checks if the provided transaction is economically correct
func (*EconomicsData) CommunityAddress ¶ added in v1.0.20
func (ed *EconomicsData) CommunityAddress() string
CommunityAddress will return community address
func (*EconomicsData) CommunityPercentage ¶ added in v1.0.20
func (ed *EconomicsData) CommunityPercentage() float64
CommunityPercentage will return community reward percentage
func (*EconomicsData) ComputeFee ¶
func (ed *EconomicsData) ComputeFee(tx process.TransactionWithFeeHandler) *big.Int
ComputeFee computes the provided transaction's fee
func (*EconomicsData) ComputeGasLimit ¶
func (ed *EconomicsData) ComputeGasLimit(tx process.TransactionWithFeeHandler) uint64
ComputeGasLimit returns the gas limit need by the provided transaction in order to be executed
func (*EconomicsData) IsInterfaceNil ¶
func (ed *EconomicsData) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*EconomicsData) LeaderPercentage ¶
func (ed *EconomicsData) LeaderPercentage() float64
LeaderPercentage will return leader reward percentage
func (*EconomicsData) MaxGasLimitPerBlock ¶
func (ed *EconomicsData) MaxGasLimitPerBlock() uint64
MaxGasLimitPerBlock will return maximum gas limit allowed per block
func (*EconomicsData) RewardsValue ¶ added in v1.0.20
func (ed *EconomicsData) RewardsValue() *big.Int
RewardsValue will return rewards value
func (*EconomicsData) StakeValue ¶ added in v1.0.39
func (ed *EconomicsData) StakeValue() *big.Int
StakeValue will return the minimum stake value
func (*EconomicsData) UnBoundPeriod ¶ added in v1.0.39
func (ed *EconomicsData) UnBoundPeriod() uint64
UnBoundPeriod will return the unbound period
type TestEconomicsData ¶
type TestEconomicsData struct {
*EconomicsData
}
TestEconomicsData extends EconomicsData and is used in integration tests as it exposes some functions that are not supposed to be used in production code Exported functions simplify the reproduction of edge cases
func (*TestEconomicsData) SetMaxGasLimitPerBlock ¶
func (ted *TestEconomicsData) SetMaxGasLimitPerBlock(maxGasLimitPerBlock uint64)
SetMaxGasLimitPerBlock sets the maximum gas limit allowed per one block
func (*TestEconomicsData) SetMinGasLimit ¶
func (ted *TestEconomicsData) SetMinGasLimit(minGasLimit uint64)
SetMinGasLimit sets the minimum gas limit for a transaction to be accepted
func (*TestEconomicsData) SetMinGasPrice ¶
func (ted *TestEconomicsData) SetMinGasPrice(minGasPrice uint64)
SetMinGasPrice sets the minimum gas price for a transaction to be accepted
func (*TestEconomicsData) SetRewards ¶ added in v1.0.42
func (ted *TestEconomicsData) SetRewards(value *big.Int)
SetRewards sets the new reward value