chains: add genesis hashes for BTC and LTC mainnet

This commit is contained in:
Olaoluwa Osuntokun 2018-03-15 01:58:00 -07:00
parent 9aac0c41a2
commit 68f842d90b
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
1 changed files with 18 additions and 6 deletions

View File

@ -569,6 +569,14 @@ var (
0x01, 0xea, 0x33, 0x09, 0x00, 0x00, 0x00, 0x00,
})
// bitcoinMainnetGenesis is the genesis hash of Bitcoin's main chain.
bitcoinMainnetGenesis = chainhash.Hash([chainhash.HashSize]byte{
0x6f, 0xe2, 0x8c, 0x0a, 0xb6, 0xf1, 0xb3, 0x72,
0xc1, 0xa6, 0xa2, 0x46, 0xae, 0x63, 0xf7, 0x4f,
0x93, 0x1e, 0x83, 0x65, 0xe1, 0x5a, 0x08, 0x9c,
0x68, 0xd6, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
})
// litecoinTestnetGenesis is the genesis hash of Litecoin's testnet4
// chain.
litecoinTestnetGenesis = chainhash.Hash([chainhash.HashSize]byte{
@ -578,18 +586,22 @@ var (
0xd9, 0x51, 0x28, 0x4b, 0x5a, 0x62, 0x66, 0x49,
})
// litecoinMainnetGenesis is the genesis hash of Litecoin's main chain.
litecoinMainnetGenesis = chainhash.Hash([chainhash.HashSize]byte{
0xe2, 0xbf, 0x04, 0x7e, 0x7e, 0x5a, 0x19, 0x1a,
0xa4, 0xef, 0x34, 0xd3, 0x14, 0x97, 0x9d, 0xc9,
0x98, 0x6e, 0x0f, 0x19, 0x25, 0x1e, 0xda, 0xba,
0x59, 0x40, 0xfd, 0x1f, 0xe3, 0x65, 0xa7, 0x12,
})
// chainMap is a simple index that maps a chain's genesis hash to the
// chainCode enum for that chain.
chainMap = map[chainhash.Hash]chainCode{
bitcoinTestnetGenesis: bitcoinChain,
litecoinTestnetGenesis: litecoinChain,
}
// reverseChainMap is the inverse of the chainMap above: it maps the
// chain enum for a chain to its genesis hash.
reverseChainMap = map[chainCode]chainhash.Hash{
bitcoinChain: bitcoinTestnetGenesis,
litecoinChain: litecoinTestnetGenesis,
bitcoinMainnetGenesis: bitcoinChain,
litecoinMainnetGenesis: litecoinChain,
}
// chainDNSSeeds is a map of a chain's hash to the set of DNS seeds