Reset the chain.

This commit is contained in:
Grégoire Henry 2017-09-21 22:24:10 +02:00 committed by Benjamin Canou
parent 99d8357115
commit b49491587f
5 changed files with 17 additions and 7 deletions

View File

@ -1 +1 @@
2017-08-17 2017-09-21

8
scripts/gen_genesis.ml Normal file
View File

@ -0,0 +1,8 @@
let prefix = "BLockGenesisGenesisGenesisGenesisGenesis"
let suffix = "BBBBB"
let p = Base58.raw_decode (prefix ^ suffix ^ "crcCRC")
let p = String.sub p 0 (String.length p - 4)
let p = Base58.safe_encode p
let () = print_endline p

View File

@ -11,10 +11,10 @@ open Logging.Node.Main
let genesis : State.Net.genesis = { let genesis : State.Net.genesis = {
time = time =
Time.of_notation_exn "2016-11-01T00:00:00Z" ; Time.of_notation_exn "2017-09-21T00:00:00Z" ;
block = block =
Block_hash.of_b58check_exn Block_hash.of_b58check_exn
"BLockGenesisGenesisGenesisGenesisGenesisGeneskvg68z" ; "BLockGenesisGenesisGenesisGenesisGenesisBBBBBbwcZMg" ;
protocol = protocol =
Protocol_hash.of_b58check_exn Protocol_hash.of_b58check_exn
"ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" ; "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" ;

View File

@ -174,7 +174,7 @@ let versions =
let open P2p.Version in let open P2p.Version in
[ { name = "TEZOS" ; [ { name = "TEZOS" ;
major = 0 ; major = 0 ;
minor = 21 ; minor = 23 ;
} }
] ]

View File

@ -543,11 +543,13 @@ module Net_id = struct
let size = 4 let size = 4
let of_block_hash bh = let extract bh =
MBytes.substring (Block_hash.to_bytes bh) 0 4 MBytes.substring (Block_hash.to_bytes bh) 0 4
let hash_bytes l = of_block_hash (Block_hash.hash_bytes l) let hash_bytes l = extract (Block_hash.hash_bytes l)
let hash_string l = of_block_hash (Block_hash.hash_string l) let hash_string l = extract (Block_hash.hash_string l)
let of_block_hash bh = hash_bytes [Block_hash.to_bytes bh]
type Base58.data += Hash of t type Base58.data += Hash of t