mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-19 05:36:15 +00:00
Remove extraneous empty value initialization
Signed-off-by: Thane Thomson <connect@thanethomson.com>
This commit is contained in:
@@ -324,12 +324,7 @@ func (blockExec *BlockExecutor) ExtendVote(ctx context.Context, vote *types.Vote
|
||||
}
|
||||
|
||||
func (blockExec *BlockExecutor) VerifyVoteExtension(ctx context.Context, vote *types.Vote) error {
|
||||
req := abci.RequestVerifyVoteExtension{
|
||||
Hash: []byte{},
|
||||
ValidatorAddress: []byte{},
|
||||
Height: 0,
|
||||
VoteExtension: []byte{},
|
||||
}
|
||||
req := abci.RequestVerifyVoteExtension{}
|
||||
|
||||
resp, err := blockExec.appClient.VerifyVoteExtension(ctx, req)
|
||||
if err != nil {
|
||||
|
||||
+8
-10
@@ -22,16 +22,14 @@ var stamp = time.Date(2019, 10, 13, 16, 14, 44, 0, time.UTC)
|
||||
|
||||
func exampleVote() *types.Vote {
|
||||
return &types.Vote{
|
||||
Type: tmproto.SignedMsgType(1),
|
||||
Height: 3,
|
||||
Round: 2,
|
||||
BlockID: types.BlockID{Hash: tmhash.Sum([]byte("blockID_hash")), PartSetHeader: types.PartSetHeader{Total: 1000000, Hash: tmhash.Sum([]byte("blockID_part_set_header_hash"))}},
|
||||
Timestamp: stamp,
|
||||
ValidatorAddress: crypto.AddressHash([]byte("validator_address")),
|
||||
ValidatorIndex: 56789,
|
||||
Signature: []byte{},
|
||||
Extension: []byte("app_data_signed"),
|
||||
ExtensionSignature: []byte{},
|
||||
Type: tmproto.SignedMsgType(1),
|
||||
Height: 3,
|
||||
Round: 2,
|
||||
BlockID: types.BlockID{Hash: tmhash.Sum([]byte("blockID_hash")), PartSetHeader: types.PartSetHeader{Total: 1000000, Hash: tmhash.Sum([]byte("blockID_part_set_header_hash"))}},
|
||||
Timestamp: stamp,
|
||||
ValidatorAddress: crypto.AddressHash([]byte("validator_address")),
|
||||
ValidatorIndex: 56789,
|
||||
Extension: []byte("app_data_signed"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-10
@@ -131,16 +131,13 @@ func TestVoteSignBytesTestVectors(t *testing.T) {
|
||||
// containing vote extension
|
||||
5: {
|
||||
"test_chain_id", &Vote{
|
||||
Type: 0,
|
||||
Height: 1,
|
||||
Round: 1,
|
||||
BlockID: BlockID{},
|
||||
Timestamp: time.Time{},
|
||||
ValidatorAddress: []byte{},
|
||||
ValidatorIndex: 0,
|
||||
Signature: []byte{},
|
||||
Extension: []byte("signed"),
|
||||
ExtensionSignature: []byte{},
|
||||
Type: 0,
|
||||
Height: 1,
|
||||
Round: 1,
|
||||
BlockID: BlockID{},
|
||||
Timestamp: time.Time{},
|
||||
ValidatorIndex: 0,
|
||||
Extension: []byte("signed"),
|
||||
},
|
||||
[]byte{
|
||||
0x2e, // length
|
||||
|
||||
Reference in New Issue
Block a user