Documentation ¶
Index ¶
Constants ¶
View Source
const PluginName = "POW"
PluginName is the name of the PoW plugin.
Variables ¶
View Source
var ErrMessageTooSmall = errors.New("message too small")
ErrMessageTooSmall is returned when the message is smaller than the 8-byte nonce.
View Source
var Parameters = &ParametersDefinition{}
Parameters contains the configuration used by the pow plugin.
View Source
var ( // Plugin is the plugin instance of the PoW plugin. Plugin *node.Plugin )
Functions ¶
Types ¶
type ParametersDefinition ¶ added in v0.7.4
type ParametersDefinition struct { // Difficulty defines the PoW difficulty. Difficulty int `default:"21" usage:"PoW difficulty"` // NumThreads defines how many threaded workers are used to do PoW. NumThreads int `default:"1" usage:"number of threads used to do the PoW"` // Timeout defines the maximum allow time to perform PoW. Timeout time.Duration `default:"1m" usage:"PoW timeout"` // ParentsRefreshInterval defines the timeout for parents refreshing. ParentsRefreshInterval time.Duration `default:"300ms" usage:"PoW parents refresh interval timeout"` }
ParametersDefinition contains the definition of the parameters used by the pow plugin.
Click to show internal directories.
Click to hide internal directories.