Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DCP0001 = HardcodedDeployment{
MainNetActivationHeight: 149248,
TestNet2ActivationHeight: 46128,
TestNet3ActivationHeight: 0,
SimNetActivationHeight: 0,
}
DCP0001 specifies hard forking changes to the stake difficulty algorithm as defined by https://github.com/decred/dcps/blob/master/dcp-0001/dcp-0001.mediawiki.
var DCP0002 = HardcodedDeployment{
MainNetActivationHeight: 189568,
TestNet2ActivationHeight: 151968,
TestNet3ActivationHeight: 0,
SimNetActivationHeight: 0,
}
DCP0002 specifies the activation of the OP_SHA256 hard fork as defined by https://github.com/decred/dcps/blob/master/dcp-0002/dcp-0002.mediawiki.
var DCP0003 = HardcodedDeployment{
MainNetActivationHeight: 189568,
TestNet2ActivationHeight: 151968,
TestNet3ActivationHeight: 0,
SimNetActivationHeight: 0,
}
DCP0003 specifies the activation of a CSV soft fork as defined by https://github.com/decred/dcps/blob/master/dcp-0003/dcp-0003.mediawiki.
Functions ¶
func DCP0010Active ¶
func DCP0010Active(ctx context.Context, height int32, params *chaincfg.Params, syncer interface{}) (bool, error)
DCP0010Active returns whether the consensus rules for the next block with the current chain tip height requires the subsidy split as specified in DCP0010. DCP0010 is always active on simnet, and requires the RPC syncer to detect activation on mainnet and testnet3.
func DCP0012Active ¶
func DCP0012Active(ctx context.Context, height int32, params *chaincfg.Params, syncer interface{}) (bool, error)
DCP0012Active returns whether the consensus rules for the next block with the current chain tip height requires the version 2 subsidy split as specified in DCP0012. DCP0012 requires the RPC syncer to detect activation on mainnet, testnet3 and simnet.
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, net wire.CurrencyNet) bool
Active returns whether the hardcoded deployment is active at height on the network specified by params. Active always returns false for unrecognized networks.