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

@ -66,7 +66,9 @@ func makeBlock(height int64, state *State) *types.Block {
prevParts := types.PartSetHeader{}
valHash := state.Validators.Hash()
prevBlockID := types.BlockID{prevHash, prevParts}
block, _ := types.MakeBlock(height, chainID, makeTxs(height), new(types.Commit),
prevBlockID, valHash, state.AppHash, testPartSize)
block, _ := types.MakeBlock(height, chainID,
makeTxs(height), state.LastBlockTotalTx,
new(types.Commit), prevBlockID, valHash,
state.AppHash, testPartSize)
return block
}