From 3065059da7bb57714f08c7a6fcb97e4b36be0194 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Mon, 26 Jun 2017 17:20:27 -0400 Subject: [PATCH] update changelog --- CHANGELOG.md | 6 +++++- types/genesis.go | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45b93b342..7c14c2f79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,17 +3,21 @@ ## 0.10.1 (TBD) FEATURES: -- Use `--trace` to get stack traces for logged errors +- types: GenesisDoc.ValidatorHash returns the hash of the genesis validator set +- types: GenesisDocFromFile parses a GenesiDoc from a JSON file IMPROVEMENTS: - Add a Code of Conduct - Variety of improvements as suggested by `megacheck` tool - rpc: deduplicate tests between rpc/client and rpc/tests - rpc: addresses without a protocol prefix default to `tcp://`. `http://` is also accepted as an alias for `tcp://` +- cmd: commands are more easily reuseable from other tools +- DOCKER: automate build/push BUG FIXES: - Fix log statements using keys with spaces (logger does not currently support spaces) - rpc: set logger on websocket connection +- rpc: fix ws connection stability by setting write deadline on pings ## 0.10.0 (June 2, 2017) diff --git a/types/genesis.go b/types/genesis.go index 8698dacb3..23b14c9e9 100644 --- a/types/genesis.go +++ b/types/genesis.go @@ -20,12 +20,14 @@ var GenDocKey = []byte("GenDocKey") //------------------------------------------------------------ // core types for a genesis definition +// GenesisValidator is an initial validator. type GenesisValidator struct { PubKey crypto.PubKey `json:"pub_key"` Amount int64 `json:"amount"` Name string `json:"name"` } +// GenesisDoc defines the initial conditions for a tendermint blockchain, in particular its validator set. type GenesisDoc struct { GenesisTime time.Time `json:"genesis_time"` ChainID string `json:"chain_id"` @@ -33,7 +35,7 @@ type GenesisDoc struct { AppHash data.Bytes `json:"app_hash"` } -// Utility method for saving GenensisDoc as JSON file. +// SaveAs is a utility method for saving GenensisDoc as a JSON file. func (genDoc *GenesisDoc) SaveAs(file string) error { genDocBytes, err := json.Marshal(genDoc) if err != nil { @@ -42,6 +44,7 @@ func (genDoc *GenesisDoc) SaveAs(file string) error { return cmn.WriteFile(file, genDocBytes, 0644) } +// ValidatorHash returns the hash of the validator set contained in the GenesisDoc func (genDoc *GenesisDoc) ValidatorHash() []byte { vals := make([]*Validator, len(genDoc.Validators)) for i, v := range genDoc.Validators {