Documentation ¶
Index ¶
- Constants
- func DecodeTransaction(tx models.Transaction) (functionSig string, params any, err error)
- func FormatFloat(f float64) string
- func GetYieldIntervalEnd(pbft_count uint64, block_num *uint64, interval uint64) uint64
- func MakeThreadPool() pool.Pool
- func ParseBool(s string) (v bool)
- func ParseInt(s string) (v int64)
- func ParseStringToBigInt(v string) *big.Int
- func ParseToString(item any) (result any, err error)
- func ParseUInt(s string) (v uint64)
- func ProcessTransaction(trx *models.Transaction) (err error)
- type CallData
- type ChainConfig
- type Config
- type Task
- type TaskWithResult
Constants ¶
View Source
const DposContractAddress = "0x00000000000000000000000000000000000000fe"
Variables ¶
This section is empty.
Functions ¶
func DecodeTransaction ¶ added in v0.2.3
func DecodeTransaction(tx models.Transaction) (functionSig string, params any, err error)
func FormatFloat ¶
func GetYieldIntervalEnd ¶
func MakeThreadPool ¶
func MakeThreadPool() pool.Pool
isn't creating threads, but limiting goroutines count. Mostly used for RPC and db related tasks
func ParseStringToBigInt ¶
func ParseToString ¶ added in v0.2.3
func ProcessTransaction ¶ added in v0.2.3
func ProcessTransaction(trx *models.Transaction) (err error)
Types ¶
type ChainConfig ¶
type ChainConfig struct { CommitteeSize *big.Int BlocksPerYear *big.Int YieldPercentage *big.Int DagProposersReward *big.Int MaxBlockAuthorReward *big.Int EligibilityBalanceThreshold *big.Int }
func DefaultChainConfig ¶
func DefaultChainConfig() *ChainConfig
type Config ¶
type Config struct { Chain *ChainConfig TotalYieldSavingInterval uint64 ValidatorsYieldSavingInterval uint64 }
func DefaultConfig ¶
func DefaultConfig() *Config
type TaskWithResult ¶
type TaskWithResult[P, R any] struct { // contains filtered or unexported fields }
func MakeTaskWithResult ¶
func MakeTaskWithResult[P, R any](f func(P) (R, error), params P, result *R, err *error) *TaskWithResult[P, R]
func (*TaskWithResult[P, R]) Run ¶
func (t *TaskWithResult[P, R]) Run()
Click to show internal directories.
Click to hide internal directories.