mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-11 06:11:07 +00:00
Embed CommitSig into ExtendedCommitSig instead of duplicating fields
Signed-off-by: Thane Thomson <connect@thanethomson.com>
This commit is contained in:
@@ -591,10 +591,12 @@ func makeExtCommit(height int64, valAddr []byte) *types.ExtendedCommit {
|
||||
Height: height,
|
||||
BlockID: types.BlockID{},
|
||||
ExtendedSignatures: []types.ExtendedCommitSig{{
|
||||
BlockIDFlag: types.BlockIDFlagCommit,
|
||||
ValidatorAddress: valAddr,
|
||||
Timestamp: defaultEvidenceTime,
|
||||
Signature: []byte("Signature"),
|
||||
CommitSig: types.CommitSig{
|
||||
BlockIDFlag: types.BlockIDFlagCommit,
|
||||
ValidatorAddress: valAddr,
|
||||
Timestamp: defaultEvidenceTime,
|
||||
Signature: []byte("Signature"),
|
||||
},
|
||||
}},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,7 +437,7 @@ func buildLastExtendedCommitInfo(ec *types.ExtendedCommit, store Store, initialH
|
||||
if ecs.BlockIDFlag == types.BlockIDFlagCommit {
|
||||
// We only care about vote extensions if a validator has voted to
|
||||
// commit.
|
||||
ext = ecs.VoteExtension
|
||||
ext = ecs.Extension
|
||||
}
|
||||
var vpb abci.Validator
|
||||
// The ValidatorAddress field is empty when their vote is absent.
|
||||
|
||||
@@ -30,10 +30,12 @@ type cleanupFunc func()
|
||||
// timestamp
|
||||
func makeTestExtCommit(height int64, timestamp time.Time) *types.ExtendedCommit {
|
||||
extCommitSigs := []types.ExtendedCommitSig{{
|
||||
BlockIDFlag: types.BlockIDFlagCommit,
|
||||
ValidatorAddress: tmrand.Bytes(crypto.AddressSize),
|
||||
Timestamp: timestamp,
|
||||
Signature: []byte("Signature"),
|
||||
CommitSig: types.CommitSig{
|
||||
BlockIDFlag: types.BlockIDFlagCommit,
|
||||
ValidatorAddress: tmrand.Bytes(crypto.AddressSize),
|
||||
Timestamp: timestamp,
|
||||
Signature: []byte("Signature"),
|
||||
},
|
||||
}}
|
||||
return &types.ExtendedCommit{
|
||||
Height: height,
|
||||
|
||||
Reference in New Issue
Block a user