Versions in this module Expand all Collapse all v1 v1.0.2 Mar 23, 2022 v1.0.1 Mar 17, 2022 Changes in this version + const VoteIDMaxBlockSize + var BlockOneLedgerMainNet = []*TokenPayout + var BlockOneLedgerSimNet = []*TokenPayout + var BlockOneLedgerTestNet = []*TokenPayout + var BlockOneLedgerTestNet2 = []*TokenPayout + var CPUMinerThreads = 1 + var CheckForDuplicateHashes = false + var ErrDuplicateChoiceId = errors.New("duplicate choice ID") + var ErrDuplicateNet = errors.New("duplicate Hc network") + var ErrDuplicateVoteId = errors.New("duplicate vote id") + var ErrInvalidAbstain = errors.New("invalid abstain bits") + var ErrInvalidBits = errors.New("invalid vote bits") + var ErrInvalidBothFlags = errors.New(...) + var ErrInvalidIsAbstain = errors.New(...) + var ErrInvalidIsNo = errors.New("one and only one IsNo rule violation") + var ErrInvalidMask = errors.New("invalid mask") + var ErrNotConsecutive = errors.New("choices not consecutive") + var ErrTooManyChoices = errors.New("too many choices") + var ErrUnknownHDKeyID = errors.New("unknown hd private extended key bytes") + var MainNetParams = Params + var SigHashOptimization = false + var SimNetParams = Params + var TestNet2Params = Params + var VoteBitsNotFound = fmt.Errorf("vote bits not found") + func HDPrivateKeyToPublicKeyID(id []byte) ([]byte, error) + func IsPKHEdwardsAddrID(id [2]byte) bool + func IsPKHSchnorrAddrID(id [2]byte) bool + func IsPubKeyAddrID(id [2]byte) bool + func IsPubKeyHashAddrID(id [2]byte) bool + func IsScriptHashAddrID(id [2]byte) bool + func Register(params *Params) error + type Checkpoint struct + Hash *chainhash.Hash + Height int64 + type Choice struct + Bits uint16 + Description string + Id string + IsAbstain bool + IsNo bool + type ConsensusDeployment struct + ExpireTime uint64 + StartTime uint64 + Vote Vote + type Params struct + BaseSubsidy int64 + BlockEnforceNumRequired uint64 + BlockOneLedger []*TokenPayout + BlockRejectNumRequired uint64 + BlockTaxProportion uint16 + BlockUpgradeNumToCheck uint64 + Checkpoints []Checkpoint + CoinbaseMaturity uint16 + DNSSeeds []string + DefaultPort string + Deployments map[uint32][]ConsensusDeployment + DivSubsidy int64 + GenerateSupported bool + GenesisBlock *wire.MsgBlock + GenesisHash *chainhash.Hash + HDCoinType uint32 + HDPrivateKeyID [4]byte + HDPublicKeyID [4]byte + MaxFreshStakePerBlock uint8 + MaxTxSize int + MaximumBlockSizes []int + MinDiffReductionTime time.Duration + MinimumStakeDiff int64 + MulSubsidy int64 + Name string + Net wire.CurrencyNet + NetworkAddressPrefix string + OmniMoneyReceive string + OmniStartHeight uint64 + OrganizationPkScript []byte + OrganizationPkScriptVersion uint16 + PKHBlissAddrID [2]byte + PKHEdwardsAddrID [2]byte + PKHSchnorrAddrID [2]byte + PowLimit *big.Int + PowLimitBits uint32 + PrivateKeyID [2]byte + PubKeyAddrID [2]byte + PubKeyBlissAddrID [2]byte + PubKeyHashAddrID [2]byte + ReduceMinDifficulty bool + RelayNonStdTxs bool + RetargetAdjustmentFactor int64 + RuleChangeActivationDivisor uint32 + RuleChangeActivationInterval uint32 + RuleChangeActivationMultiplier uint32 + RuleChangeActivationQuorum uint32 + SStxChangeMaturity uint16 + ScriptHashAddrID [2]byte + StakeBaseSigScript []byte + StakeDiffAlpha int64 + StakeDiffWindowSize int64 + StakeDiffWindows int64 + StakeEnabledHeight int64 + StakeMajorityDivisor int32 + StakeMajorityMultiplier int32 + StakeRewardProportion uint16 + StakeValidationHeight int64 + StakeVersionInterval int64 + SubsidyReductionInterval int64 + TargetTimePerBlock time.Duration + TargetTimespan time.Duration + TicketExpiry uint32 + TicketMaturity uint16 + TicketPoolSize uint16 + TicketPoolSizeWeight uint16 + TicketsPerBlock uint16 + WorkDiffAlpha int64 + WorkDiffWindowSize int64 + WorkDiffWindows int64 + WorkRewardProportion uint16 + func (p *Params) BlockOneSubsidy() int64 + func (p *Params) LatestCheckpointHeight() int64 + func (p *Params) TotalSubsidyProportions() uint16 + func (p *Params) XPrivKeyID() [4]byte + func (p *Params) XPubKeyID() [4]byte + type TokenPayout struct + Address string + Amount int64 + type Vote struct + Choices []Choice + Description string + Id string + Mask uint16 + func (v *Vote) VoteIndex(vote uint16) int