You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
476 B

  1. package v0
  2. import (
  3. sm "github.com/tendermint/tendermint/state"
  4. "github.com/tendermint/tendermint/types"
  5. )
  6. func makeTxs(height int64) (txs []types.Tx) {
  7. for i := 0; i < 10; i++ {
  8. txs = append(txs, types.Tx([]byte{byte(height), byte(i)}))
  9. }
  10. return txs
  11. }
  12. func makeBlock(height int64, state sm.State, lastCommit *types.Commit) *types.Block {
  13. block, _ := state.MakeBlock(height, makeTxs(height), lastCommit, nil, state.Validators.GetProposer().Address)
  14. return block
  15. }