mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-20 06:54:41 +00:00
types: Remove NewExtendedCommit constructor
Signed-off-by: Thane Thomson <connect@thanethomson.com>
This commit is contained in:
@@ -43,9 +43,9 @@ func (p testPeer) runInputRoutine() {
|
||||
// Request desired, pretend like we got the block immediately.
|
||||
func (p testPeer) simulateInput(input inputData) {
|
||||
block := &types.Block{Header: types.Header{Height: input.request.Height}}
|
||||
var blockID types.BlockID
|
||||
var extCommitSigs []types.ExtendedCommitSig
|
||||
extCommit := types.NewExtendedCommit(input.request.Height, 0, blockID, extCommitSigs)
|
||||
extCommit := &types.ExtendedCommit{
|
||||
Height: input.request.Height,
|
||||
}
|
||||
_ = input.pool.AddBlock(input.request.PeerID, block, extCommit, 123)
|
||||
// TODO: uncommenting this creates a race which is detected by:
|
||||
// https://github.com/golang/go/blob/2bd767b1022dd3254bcec469f0ee164024726486/src/testing/testing.go#L854-L856
|
||||
|
||||
@@ -150,7 +150,7 @@ func (rts *reactorTestSuite) addNode(
|
||||
var lastExtCommit *types.ExtendedCommit
|
||||
|
||||
// The commit we are building for the current height.
|
||||
seenExtCommit := types.NewExtendedCommit(0, 0, types.BlockID{}, nil)
|
||||
seenExtCommit := &types.ExtendedCommit{}
|
||||
|
||||
for blockHeight := int64(1); blockHeight <= maxBlockHeight; blockHeight++ {
|
||||
lastExtCommit = seenExtCommit.Copy()
|
||||
@@ -173,12 +173,12 @@ func (rts *reactorTestSuite) addNode(
|
||||
time.Now(),
|
||||
)
|
||||
require.NoError(t, err)
|
||||
seenExtCommit = types.NewExtendedCommit(
|
||||
vote.Height,
|
||||
vote.Round,
|
||||
blockID,
|
||||
[]types.ExtendedCommitSig{vote.ExtendedCommitSig()},
|
||||
)
|
||||
seenExtCommit = &types.ExtendedCommit{
|
||||
Height: vote.Height,
|
||||
Round: vote.Round,
|
||||
BlockID: blockID,
|
||||
ExtendedSignatures: []types.ExtendedCommitSig{vote.ExtendedCommitSig()},
|
||||
}
|
||||
|
||||
state, err = blockExec.ApplyBlock(ctx, state, blockID, thisBlock)
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user