network > chain_id, put in genesis.json

This commit is contained in:
Ethan Buchman
2015-05-29 14:13:45 -04:00
parent bb67fe0356
commit 8a2d9525f0
22 changed files with 139 additions and 60 deletions

View File

@ -46,8 +46,8 @@ const (
)
func (vote *Vote) WriteSignBytes(w io.Writer, n *int64, err *error) {
// We hex encode the network name so we don't deal with escaping issues.
binary.WriteTo([]byte(Fmt(`{"network":"%X"`, config.GetString("network"))), w, n, err)
// We hex encode the chain_id name so we don't deal with escaping issues.
binary.WriteTo([]byte(Fmt(`{"chain_id":"%X"`, config.GetString("chain_id"))), w, n, err)
binary.WriteTo([]byte(Fmt(`,"vote":{"block_hash":"%X","block_parts":%v`, vote.BlockHash, vote.BlockParts)), w, n, err)
binary.WriteTo([]byte(Fmt(`,"height":%v,"round":%v,"type":%v}}`, vote.Height, vote.Round, vote.Type)), w, n, err)
}