Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Max gas that one block contains MaxBlockGas = uint64(100000000) //config parameter for coinbase reward CoinbasePendingBlockNumber = uint64(6) InitialBlockSubsidy = uint64(1470000000000000000) // config for pow mining PowMinBits = uint64(2305843009213861724) BlocksPerRetarget = uint64(128) TargetSecondsPerBlock = uint64(60) SeedPerRetarget = uint64(128) // MaxTimeOffsetSeconds is the maximum number of seconds a block time is allowed to be ahead of the current time MaxTimeOffsetSeconds = uint64(60 * 60) MedianTimeBlocks = 11 PayToWitnessPubKeyHashDataSize = 20 PayToWitnessScriptHashDataSize = 32 CoinbaseArbitrarySizeLimit = 128 VMGasRate = int64(1000) StorageGasRate = int64(5) MaxGasAmount = int64(100000) DefaultGasCredit = int64(80000) BTMAlias = "BTM" BTMSymbol = "BTM" BTMDecimals = 8 BTMDescription = `Bytom Official Issue` )
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 BTMDefinitionMap = map[string]interface{}{ "name": BTMAlias, "symbol": BTMSymbol, "decimals": BTMDecimals, "description": BTMDescription, }
BTMDefinitionMap is the ....
View Source
var InitialSeed = &bc.Hash{ V0: uint64(11412844483649490393), V1: uint64(4614157290180302959), V2: uint64(1780246333311066183), V3: uint64(9357197556716379726), }
InitialSeed is SHA3-256 of Byte[0^32]
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 ¶
BlockSubsidy calculate the coinbase rewards on given block height
func IsBech32SegwitPrefix ¶ added in v0.1.4
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 ¶
Click to show internal directories.
Click to hide internal directories.