OSDN Git Service

fix conflicts
[bytom/bytom.git] / consensus / general.go
1 package consensus
2
3 import (
4         "github.com/bytom/protocol/bc"
5 )
6
7 const (
8         // define the Max transaction size and Max block size
9         MaxTxSize    = uint64(1024)
10         MaxBlockSzie = uint64(16384)
11
12         //config parameter for coinbase reward
13         subsidyReductionInterval = uint64(560640)
14         baseSubsidy              = uint64(624000000000)
15         initialBlockSubsidy      = uint64(1470000000000000000)
16
17         // config for pow mining
18         powMinBits            = uint64(2161727821138738707)
19         blocksPerRetarget     = uint64(1024)
20         targetSecondsPerBlock = uint64(60)
21 )
22
23 // define the BTM asset id, the soul asset of Bytom
24 var BTMAssetID = &bc.AssetID{
25         V0: uint64(18446744073709551615),
26         V1: uint64(18446744073709551615),
27         V2: uint64(18446744073709551615),
28         V3: uint64(18446744073709551615),
29 }
30
31 func BlockSubsidy(height uint64) uint64 {
32         if height == 0 {
33                 return initialBlockSubsidy
34         }
35         return baseSubsidy >> uint(height/subsidyReductionInterval)
36 }
37
38 func InitBlock() []byte {
39         return []byte("03010000000000000000000000000000000000000000000000000000000000000000008a9edde9ea2b40dc4e0aaee625a0b0d72c9e6fef0a70cb016ba55d86e85ebec9da87651aa15109492159980684155da19e87de0d1b37b35c1a1123770ec1dcc710aabe77607cce00fbdfb3e6cc99b32601070107008a9edde9ea2b000001012cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8080ccdee2a69fb314010151000000")
40 }