consensus

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2018 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// define the Max transaction size and Max block size
	MaxTxSize    = uint64(1048576)
	MaxBlockSzie = uint64(10485760)

	//config parameter for coinbase reward
	CoinbasePendingBlockNumber = uint64(6)

	InitialBlockSubsidy = uint64(1470000000000000000)

	// config for pow mining
	PowMinBits            = uint64(2161727821138738707)
	BlocksPerRetarget     = uint64(1024)
	TargetSecondsPerBlock = uint64(60)
)

consensus variables

Variables

View Source
var BTMAssetID = &bc.AssetID{
	V0: uint64(18446744073709551615),
	V1: uint64(18446744073709551615),
	V2: uint64(18446744073709551615),
	V3: uint64(18446744073709551615),
}

BTMAssetID is BTM's asset id, the soul asset of Bytom

View Source
var MainNetParams = Params{
	Name:            "main",
	Bech32HRPSegwit: "bm",
}

MainNetParams is the config for production

View Source
var TestNetParams = Params{
	Name:            "test",
	Bech32HRPSegwit: "tm",
}

TestNetParams is the config for test-net

Functions

func BlockSubsidy

func BlockSubsidy(height uint64) uint64

BlockSubsidy calculate the coinbase rewards on given block height

func IsBech32SegwitPrefix added in v0.1.4

func IsBech32SegwitPrefix(prefix string, params *Params) bool

IsBech32SegwitPrefix returns whether the prefix is a known prefix for segwit addresses on any default or registered network. This is used when decoding an address string into a specific address type.

Types

type Params added in v0.1.4

type Params struct {
	// Name defines a human-readable identifier for the network.
	Name            string
	Bech32HRPSegwit string
}

Params store the config for different network

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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