|
|
@ -5,8 +5,6 @@ import ( |
|
|
|
"time" |
|
|
|
|
|
|
|
tmproto "github.com/tendermint/tendermint/proto/tendermint/types" |
|
|
|
tmversion "github.com/tendermint/tendermint/proto/tendermint/version" |
|
|
|
"github.com/tendermint/tendermint/version" |
|
|
|
) |
|
|
|
|
|
|
|
func MakeCommit(blockID BlockID, height int64, round int32, |
|
|
@ -80,22 +78,3 @@ func MakeVote( |
|
|
|
|
|
|
|
return vote, nil |
|
|
|
} |
|
|
|
|
|
|
|
// MakeBlock returns a new block with an empty header, except what can be
|
|
|
|
// computed from itself.
|
|
|
|
// It populates the same set of fields validated by ValidateBasic.
|
|
|
|
func MakeBlock(height int64, txs []Tx, lastCommit *Commit, evidence []Evidence) *Block { |
|
|
|
block := &Block{ |
|
|
|
Header: Header{ |
|
|
|
Version: tmversion.Consensus{Block: version.BlockProtocol, App: 0}, |
|
|
|
Height: height, |
|
|
|
}, |
|
|
|
Data: Data{ |
|
|
|
Txs: txs, |
|
|
|
}, |
|
|
|
Evidence: EvidenceData{Evidence: evidence}, |
|
|
|
LastCommit: lastCommit, |
|
|
|
} |
|
|
|
block.fillHeader() |
|
|
|
return block |
|
|
|
} |