diff --git a/consensus/replay.go b/consensus/replay.go index f117e66d..4b35a107 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -211,6 +211,8 @@ func (h *Handshaker) Handshake(proxyApp proxy.AppConns) error { return errors.New(Fmt("Error on replay: %v", err)) } + log.Notice("Completed ABCI Handshake - Tendermint and App are synced", "appHeight", blockHeight, "appHash", appHash) + // TODO: (on restart) replay mempool return nil diff --git a/consensus/state.go b/consensus/state.go index f3fb7d16..3077439e 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -1160,13 +1160,13 @@ func (cs *ConsensusState) tryFinalizeCommit(height int) { blockID, ok := cs.Votes.Precommits(cs.CommitRound).TwoThirdsMajority() if !ok || len(blockID.Hash) == 0 { - log.Warn("Attempt to finalize failed. There was no +2/3 majority, or +2/3 was for .") + log.Warn("Attempt to finalize failed. There was no +2/3 majority, or +2/3 was for .", "height", height) return } if !cs.ProposalBlock.HashesTo(blockID.Hash) { // TODO: this happens every time if we're not a validator (ugly logs) // TODO: ^^ wait, why does it matter that we're a validator? - log.Warn("Attempt to finalize failed. We don't have the commit block.") + log.Warn("Attempt to finalize failed. We don't have the commit block.", "height", height, "proposal-block", cs.ProposalBlock.Hash(), "commit-block", blockID.Hash) return } // go diff --git a/types/block.go b/types/block.go index a19afaac..61d25f6e 100644 --- a/types/block.go +++ b/types/block.go @@ -96,7 +96,7 @@ func (b *Block) FillHeader() { // If the block is incomplete, block hash is nil for safety. func (b *Block) Hash() []byte { // fmt.Println(">>", b.Data) - if b.Header == nil || b.Data == nil || b.LastCommit == nil { + if b == nil || b.Header == nil || b.Data == nil || b.LastCommit == nil { return nil } b.FillHeader() diff --git a/types/validator_set.go b/types/validator_set.go index a3b2838c..ce44b328 100644 --- a/types/validator_set.go +++ b/types/validator_set.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - . "github.com/tendermint/go-common" + cmn "github.com/tendermint/go-common" "github.com/tendermint/go-merkle" ) @@ -48,7 +48,7 @@ func NewValidatorSet(vals []*Validator) *ValidatorSet { // TODO: mind the overflow when times and votingPower shares too large. func (valSet *ValidatorSet) IncrementAccum(times int) { // Add VotingPower * times to each validator and order into heap. - validatorsHeap := NewHeap() + validatorsHeap := cmn.NewHeap() for _, val := range valSet.Validators { val.Accum += int64(val.VotingPower) * int64(times) // TODO: mind overflow validatorsHeap.Push(val, accumComparable(val.Accum))