Documentation ¶
Index ¶
- Variables
- func CalcBlockQuota(db quotaDb, block *ledger.AccountBlock) (uint64, error)
- func CalcCreateQuota(fee *big.Int) uint64
- func CalcPoWDifficulty(quotaRequired uint64, q types.Quota) (*big.Int, error)
- func CalcQuotaForBlock(db quotaDb, addr types.Address, pledgeAmount *big.Int, difficulty *big.Int) (quotaTotal, quotaAddition uint64, err error)
- func CanPoW(db quotaDb, address types.Address) (bool, error)
- func CheckQuota(db quotaDb, q types.Quota, addr types.Address) bool
- func GetPledgeQuota(db quotaDb, beneficial types.Address, pledgeAmount *big.Int) (types.Quota, error)
- func InitQuotaConfig(isTest, isTestParam bool)
- type NodeConfig
- type QuotaParams
Constants ¶
This section is empty.
Variables ¶
View Source
var ( QuotaParamMainnet = NewQuotaParams("4.201037667e-24", "6.259408129e-10") QuotaParamTestnet = NewQuotaParams("4.200617563e-21", "6.409829346e-07") )
Functions ¶
func CalcBlockQuota ¶
func CalcBlockQuota(db quotaDb, block *ledger.AccountBlock) (uint64, error)
func CalcPoWDifficulty ¶ added in v1.3.0
func CalcQuotaForBlock ¶
func CheckQuota ¶
Check whether current quota of a contract account is enough to receive a new block
func GetPledgeQuota ¶
Types ¶
type NodeConfig ¶
type NodeConfig struct { QuotaParams // contains filtered or unexported fields }
type QuotaParams ¶
type QuotaParams struct {
// contains filtered or unexported fields
}
func NewQuotaParams ¶
func NewQuotaParams(strA, strB string) QuotaParams
Click to show internal directories.
Click to hide internal directories.