fork

package
v2.10.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: GPL-3.0 Imports: 5 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForkPoints

func CheckForkPoints(points config.ForkPoints) error

func GetForkPoints

func GetForkPoints() config.ForkPoints

func IsActiveForkPoint

func IsActiveForkPoint(snapshotHeight uint64) bool

func IsDexFeeFork

func IsDexFeeFork(snapshotHeight uint64) bool

IsDexFeeFork checks whether current snapshot block height is over dex fee hard fork. Vite pre-mainnet hard forks at snapshot block height 8013367. Dex fee hard fork is an emergency hard fork to solve one wrongly placed order which has caused ViteX failed to display user balances.

func IsDexFork

func IsDexFork(snapshotHeight uint64) bool

IsDexFork checks whether current snapshot block height is over sprout hard fork. Vite pre-mainnet hard forks at snapshot block height 5442723. Features:

  1. Dynamic quota acquisition. Quota acquisition from staking will reduce when network traffic rate is too high.
  2. Adjustment of quota consumption for some built-in contract transactions and VM instructions.
  3. ViteX decentralized exchange support.

func IsDexMiningFork

func IsDexMiningFork(snapshotHeight uint64) bool

func IsDexRobotFork

func IsDexRobotFork(snapshotHeight uint64) bool

func IsDexStableMarketFork

func IsDexStableMarketFork(snapshotHeight uint64) bool

func IsEarthFork

func IsEarthFork(snapshotHeight uint64) bool

func IsForkActive

func IsForkActive(point ForkPointItem) bool

func IsInitActiveChecker

func IsInitActiveChecker() bool

func IsInitForkPoint

func IsInitForkPoint() bool

func IsLeafFork

func IsLeafFork(snapshotHeight uint64) bool

func IsSeedFork

func IsSeedFork(snapshotHeight uint64) bool

IsSeedFork checks whether current snapshot block height is over seed hard fork. Vite pre-mainnet hard forks at snapshot block height 3488471. Contents:

  1. Vm log list hash add account address and prevHash since seed fork.
  2. Create contract params add seed count since seed fork.
  3. Verifier verifies seed count since seed fork.
  4. Vm interpreters add SEED opcode since seed fork.

func IsStemFork

func IsStemFork(snapshotHeight uint64) bool

IsStemFork checks whether current snapshot block height is over stem hard fork. Vite pre-mainnet hard forks at snapshot block height 8403110. Features:

  1. Capability of placing/cancelling orders via delegation.
  2. Super VIP membership. Stake and then enjoy zero trading fee! (Additional operator fee cannot be exempted)

func SetActiveChecker

func SetActiveChecker(ac ActiveChecker)

func SetForkPoints

func SetForkPoints(points *config.ForkPoints)

Types

type ActiveChecker

type ActiveChecker interface {
	IsForkActive(point ForkPointItem) bool
}

type ForkPointItem

type ForkPointItem struct {
	config.ForkPoint
	ForkName string
}

func GetForkPoint

func GetForkPoint(snapshotHeight uint64) *ForkPointItem

func GetLastForkPoint

func GetLastForkPoint() *ForkPointItem

func GetLeafForkPoint

func GetLeafForkPoint() *ForkPointItem

func GetRecentActiveFork

func GetRecentActiveFork(blockHeight uint64) *ForkPointItem

type ForkPointList

type ForkPointList []*ForkPointItem

func GetActiveForkPointList

func GetActiveForkPointList() ForkPointList

func GetForkPointList

func GetForkPointList() ForkPointList

func (ForkPointList) Len

func (a ForkPointList) Len() int

func (ForkPointList) Less

func (a ForkPointList) Less(i, j int) bool

func (ForkPointList) Swap

func (a ForkPointList) Swap(i, j int)

type ForkPointMap

type ForkPointMap map[string]*ForkPointItem

func GetForkPointMap

func GetForkPointMap() ForkPointMap

Jump to

Keyboard shortcuts

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