github.com/linapex/ethereum-dpos-chinese@v0.0.0-20190316121959-b78b3a4a1ece/tests/init.go (about) 1 2 //<developer> 3 // <name>linapex 曹一峰</name> 4 // <email>linapex@163.com</email> 5 // <wx>superexc</wx> 6 // <qqgroup>128148617</qqgroup> 7 // <url>https://jsq.ink</url> 8 // <role>pku engineer</role> 9 // <date>2019-03-16 12:09:50</date> 10 //</624342685766914048> 11 12 // 13 // 14 // 15 // 16 // 17 // 18 // 19 // 20 // 21 // 22 // 23 // 24 // 25 // 26 // 27 28 package tests 29 30 import ( 31 "fmt" 32 "math/big" 33 34 "github.com/ethereum/go-ethereum/params" 35 ) 36 37 // 38 var Forks = map[string]*params.ChainConfig{ 39 "Frontier": { 40 ChainID: big.NewInt(1), 41 }, 42 "Homestead": { 43 ChainID: big.NewInt(1), 44 HomesteadBlock: big.NewInt(0), 45 }, 46 "EIP150": { 47 ChainID: big.NewInt(1), 48 HomesteadBlock: big.NewInt(0), 49 EIP150Block: big.NewInt(0), 50 }, 51 "EIP158": { 52 ChainID: big.NewInt(1), 53 HomesteadBlock: big.NewInt(0), 54 EIP150Block: big.NewInt(0), 55 EIP155Block: big.NewInt(0), 56 EIP158Block: big.NewInt(0), 57 }, 58 "Byzantium": { 59 ChainID: big.NewInt(1), 60 HomesteadBlock: big.NewInt(0), 61 EIP150Block: big.NewInt(0), 62 EIP155Block: big.NewInt(0), 63 EIP158Block: big.NewInt(0), 64 DAOForkBlock: big.NewInt(0), 65 ByzantiumBlock: big.NewInt(0), 66 }, 67 "Constantinople": { 68 ChainID: big.NewInt(1), 69 HomesteadBlock: big.NewInt(0), 70 EIP150Block: big.NewInt(0), 71 EIP155Block: big.NewInt(0), 72 EIP158Block: big.NewInt(0), 73 DAOForkBlock: big.NewInt(0), 74 ByzantiumBlock: big.NewInt(0), 75 ConstantinopleBlock: big.NewInt(0), 76 }, 77 "FrontierToHomesteadAt5": { 78 ChainID: big.NewInt(1), 79 HomesteadBlock: big.NewInt(5), 80 }, 81 "HomesteadToEIP150At5": { 82 ChainID: big.NewInt(1), 83 HomesteadBlock: big.NewInt(0), 84 EIP150Block: big.NewInt(5), 85 }, 86 "HomesteadToDaoAt5": { 87 ChainID: big.NewInt(1), 88 HomesteadBlock: big.NewInt(0), 89 DAOForkBlock: big.NewInt(5), 90 DAOForkSupport: true, 91 }, 92 "EIP158ToByzantiumAt5": { 93 ChainID: big.NewInt(1), 94 HomesteadBlock: big.NewInt(0), 95 EIP150Block: big.NewInt(0), 96 EIP155Block: big.NewInt(0), 97 EIP158Block: big.NewInt(0), 98 ByzantiumBlock: big.NewInt(5), 99 }, 100 } 101 102 // 103 type UnsupportedForkError struct { 104 Name string 105 } 106 107 func (e UnsupportedForkError) Error() string { 108 return fmt.Sprintf("unsupported fork %q", e.Name) 109 } 110