Add TotalTx to block header, issue #952

Update state to keep track of this info.
Change function args as needed.
Make NumTx also an int64 for consistency.
This commit is contained in:
Ethan Frey
2017-12-12 13:16:03 +01:00
parent 64f056b57d
commit dedf03bb81
8 changed files with 52 additions and 24 deletions

View File

@ -112,10 +112,11 @@ func genHeader(chainID string, height int64, txs types.Txs,
vals *types.ValidatorSet, appHash []byte) *types.Header {
return &types.Header{
ChainID: chainID,
Height: height,
Time: time.Now(),
NumTxs: len(txs),
ChainID: chainID,
Height: height,
Time: time.Now(),
NumTxs: int64(len(txs)),
TotalTxs: int64(len(txs)),
// LastBlockID
// LastCommitHash
ValidatorsHash: vals.Hash(),