deployments

package
v0.0.0-...-9e8562e Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2019 License: ISC Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DCP0001 = HardcodedDeployment{
	MainNetActivationHeight:  0,
	TestNet2ActivationHeight: 0,
	TestNet3ActivationHeight: 0,
	SimNetActivationHeight:   0,
}

DCP0001 specifies hard forking changes to the stake difficulty algorithm as defined by https://github.com/UtopiaCoinOrg/dcps/blob/master/dcp-0001/dcp-0001.mediawiki.

Functions

This section is empty.

Types

type HardcodedDeployment

type HardcodedDeployment struct {
	MainNetActivationHeight  int32
	TestNet2ActivationHeight int32
	TestNet3ActivationHeight int32
	SimNetActivationHeight   int32
}

HardcodedDeployment specifies hardcoded block heights that a deployment activates at. If the value is negative, the deployment is either inactive or can't be determined due to the uniqueness properties of the network.

Since these are hardcoded deployments, and cannot support every possible network, conditional logic should only be applied when a deployment is active, not when it is inactive.

func (*HardcodedDeployment) Active

func (d *HardcodedDeployment) Active(height int32, params *chaincfg.Params) bool

// DCP0002 specifies the activation of the OP_SHA256 hard fork as defined by // https://github.com/UtopiaCoinOrg/dcps/blob/master/dcp-0002/dcp-0002.mediawiki.

var DCP0002 = HardcodedDeployment{
	MainNetActivationHeight:  0,
	TestNet2ActivationHeight: 0,
	TestNet3ActivationHeight: 0,
	SimNetActivationHeight:   0,
}

// DCP0003 specifies the activation of a CSV soft fork as defined by // https://github.com/UtopiaCoinOrg/dcps/blob/master/dcp-0003/dcp-0003.mediawiki.

var DCP0003 = HardcodedDeployment{
	MainNetActivationHeight:  0,
	TestNet2ActivationHeight: 0,
	TestNet3ActivationHeight: 0,
	SimNetActivationHeight:   0,
}

Active returns whether the hardcoded deployment is active at height on the network specified by params. Active always returns false for unrecognized networks.

Jump to

Keyboard shortcuts

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