changes as per Bucky's review

This commit is contained in:
Anton Kaliaev
2017-05-13 16:22:51 +02:00
parent c9cd8de9c6
commit f8fdbe3dbc
24 changed files with 83 additions and 227 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ import (
"strings"
"time"
"github.com/tendermint/go-wire"
wire "github.com/tendermint/go-wire"
"github.com/tendermint/go-wire/data"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tmlibs/merkle"
@@ -98,7 +98,7 @@ func (b *Block) FillHeader() {
// Computes and returns the block hash.
// If the block is incomplete, block hash is nil for safety.
func (b *Block) Hash() []byte {
func (b *Block) Hash() data.Bytes {
// fmt.Println(">>", b.Data)
if b == nil || b.Header == nil || b.Data == nil || b.LastCommit == nil {
return nil
+1 -1
View File
@@ -181,7 +181,7 @@ func (privVal *PrivValidator) SignProposal(chainID string, proposal *Proposal) e
defer privVal.mtx.Unlock()
signature, err := privVal.signBytesHRS(proposal.Height, proposal.Round, stepPropose, SignBytes(chainID, proposal))
if err != nil {
return errors.New(Fmt("Error signing proposal: %v", err))
return fmt.Errorf("Error signing proposal: %v", err)
}
proposal.Signature = signature
return nil