types: Remove NewExtendedCommit constructor

Signed-off-by: Thane Thomson <connect@thanethomson.com>
This commit is contained in:
Thane Thomson
2022-05-04 17:18:41 -04:00
parent a3b3415a3a
commit b5a94bba16
11 changed files with 46 additions and 40 deletions
-10
View File
@@ -1083,16 +1083,6 @@ type ExtendedCommit struct {
bitArray *bits.BitArray
}
// NewExtendedCommit constructs an ExtendedCommit from the given parameters.
func NewExtendedCommit(height int64, round int32, blockID BlockID, extCommitSigs []ExtendedCommitSig) *ExtendedCommit {
return &ExtendedCommit{
Height: height,
Round: round,
BlockID: blockID,
ExtendedSignatures: extCommitSigs,
}
}
// Copy creates a copy of this extended commit.
func (extCommit *ExtendedCommit) Copy() *ExtendedCommit {
ec := *extCommit
+6 -1
View File
@@ -635,7 +635,12 @@ func (voteSet *VoteSet) MakeExtendedCommit() *ExtendedCommit {
extCommitSigs[i] = extCommitSig
}
return NewExtendedCommit(voteSet.GetHeight(), voteSet.GetRound(), *voteSet.maj23, extCommitSigs)
return &ExtendedCommit{
Height: voteSet.GetHeight(),
Round: voteSet.GetRound(),
BlockID: *voteSet.maj23,
ExtendedSignatures: extCommitSigs,
}
}
//--------------------------------------------------------------------------------