blockchainconfig

package
v0.0.0-...-de85661 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTxPoolConfig = TxPoolConfig{
	Journal:   "transactions.rlp",
	Rejournal: time.Hour,

	PriceLimit: 1,
	PriceBump:  10,

	AccountSlots: 16,
	GlobalSlots:  4096 + 1024,
	AccountQueue: 64,
	GlobalQueue:  1024,

	Lifetime: 3 * time.Hour,
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Octerbase  entity.Address `toml:",omitempty"` // 区块开采奖励的公共广播
	Notify     []string       `toml:",omitempty"` // 要通知新工作包http url列表
	NotifyFull bool           `toml:",omitempty"` // 使用挂起的块标题
	ExtraData  entity.Bytes   `toml:",omitempty"` // 阻止工作者的额外数据
	GasFloor   uint64         // 工作区块的目标gas底线
	GasCeil    uint64         // 工作区块的目标gas上限
	GasPrice   *big.Int       // 工作交易的最低gas价格
	Recommit   time.Duration  // 工作者重新工作的时间间隔
	Noverify   bool           // 禁止远程工作
}

工作的配置参数

type TxPoolConfig

type TxPoolConfig struct {
	Locals    []entity.Address // 默认情况下应视为本地的地址
	NoLocals  bool             // 是否应禁用本地事务处理
	Journal   string           // 节点重新启动后的本地事务日志
	Rejournal time.Duration    // 重新生成本地事务日志的时间间隔

	PriceLimit uint64 // 强制执行的最低gas价格,以便进入事务池
	PriceBump  uint64 // 替换现有交易的最低涨价百分比(nonce)

	AccountSlots uint64 // 每个帐户保证的可执行事务插槽数
	GlobalSlots  uint64 // 所有帐户的最大可执行事务插槽数
	AccountQueue uint64 // 每个帐户允许的最大不可执行事务槽数
	GlobalQueue  uint64 // 所有帐户的最大不可执行事务插槽数

	Lifetime time.Duration // 非可执行事务排队的最长时间
}

func (*TxPoolConfig) Sanitize

func (config *TxPoolConfig) Sanitize() TxPoolConfig

sanitize检查提供的用户配置,并更改任何不合理或不可行的内容。

Jump to

Keyboard shortcuts

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