5 "github.com/bytom/protocol/bc"
9 // define the Max transaction size and Max block size
10 MaxTxSize = uint64(1024)
11 MaxBlockSzie = uint64(16384)
13 //config parameter for coinbase reward
14 subsidyReductionInterval = uint64(560640)
15 baseSubsidy = uint64(624000000000)
16 initialBlockSubsidy = uint64(1470000000000000000)
18 // config for pow mining
19 powMinBits = uint64(2161727821138738707)
20 BlocksPerRetarget = uint64(1024)
21 targetSecondsPerBlock = uint64(60)
24 // define the BTM asset id, the soul asset of Bytom
25 var BTMAssetID = &bc.AssetID{
26 V0: uint64(18446744073709551615),
27 V1: uint64(18446744073709551615),
28 V2: uint64(18446744073709551615),
29 V3: uint64(18446744073709551615),
32 func BlockSubsidy(height uint64) uint64 {
34 return initialBlockSubsidy
36 return baseSubsidy >> uint(height/subsidyReductionInterval)
39 func InitBlock() []byte {
40 return []byte("0301010000000000000000000000000000000000000000000000000000000000000000cecccaebf42b406b03545ed2b38a578e5e6b0796d4ebdd8a6dd72210873fcc026c7319de578ffc492159980684155da19e87de0d1b37b35c1a1123770ec1dcc710aabe77607cced7bb1993fcb680808080801e0107010700cecccaebf42b000001012cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8080ccdee2a69fb314010151000000")
44 // IsBech32SegwitPrefix returns whether the prefix is a known prefix for segwit
45 // addresses on any default or registered network. This is used when decoding
46 // an address string into a specific address type.
47 func IsBech32SegwitPrefix(prefix string, params *Params) bool {
48 prefix = strings.ToLower(prefix)
49 if prefix == params.Bech32HRPSegwit+"1" {
58 // Name defines a human-readable identifier for the network.
61 Bech32HRPSegwit string
66 var MainNetParams = Params {
68 Bech32HRPSegwit: "bm",
72 var TestNetParams = Params {
74 Bech32HRPSegwit: "tm",