@ -63,8 +63,8 @@ func TestVoteSignableTestVectors(t *testing.T) {
{
CanonicalizeVote ( "" , & Vote { } ) ,
// NOTE: Height and Round are skipped here. This case needs to be considered while parsing.
// []byte{0x22 , 0x9, 0x9, 0x0, 0x9, 0x6e, 0x88, 0xf1, 0xff, 0xff, 0xff},
[ ] byte { 0x22 , 0xb , 0x8 , 0x80 , 0x92 , 0xb8 , 0xc3 , 0x98 , 0xfe , 0xff , 0xff , 0xff , 0x1 } ,
// []byte{0x2a , 0x9, 0x9, 0x0, 0x9, 0x6e, 0x88, 0xf1, 0xff, 0xff, 0xff},
[ ] byte { 0x2a , 0xb , 0x8 , 0x80 , 0x92 , 0xb8 , 0xc3 , 0x98 , 0xfe , 0xff , 0xff , 0xff , 0x1 } ,
} ,
// with proper (fixed size) height and round (PreCommit):
{
@ -76,7 +76,7 @@ func TestVoteSignableTestVectors(t *testing.T) {
0x1 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , // height
0x19 , // (field_number << 3) | wire_type
0x1 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , // round
0x22 , // (field_number << 3) | wire_type
0x2a , // (field_number << 3) | wire_type
// remaining fields (timestamp):
0xb , 0x8 , 0x80 , 0x92 , 0xb8 , 0xc3 , 0x98 , 0xfe , 0xff , 0xff , 0xff , 0x1 } ,
} ,
@ -90,7 +90,7 @@ func TestVoteSignableTestVectors(t *testing.T) {
0x1 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , // height
0x19 , // (field_number << 3) | wire_type
0x1 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , // round
0x22 , // (field_number << 3) | wire_type
0x2a , // (field_number << 3) | wire_type
// remaining fields (timestamp):
0xb , 0x8 , 0x80 , 0x92 , 0xb8 , 0xc3 , 0x98 , 0xfe , 0xff , 0xff , 0xff , 0x1 } ,
} ,
@ -102,7 +102,7 @@ func TestVoteSignableTestVectors(t *testing.T) {
0x19 , // (field_number << 3) | wire_type
0x1 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , // round
// remaining fields (timestamp):
0x22 ,
0x2a ,
0xb , 0x8 , 0x80 , 0x92 , 0xb8 , 0xc3 , 0x98 , 0xfe , 0xff , 0xff , 0xff , 0x1 } ,
} ,
// containing non-empty chain_id:
@ -114,7 +114,7 @@ func TestVoteSignableTestVectors(t *testing.T) {
0x19 , // (field_number << 3) | wire_type
0x1 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , // round
// remaining fields:
0x22 , // (field_number << 3) | wire_type
0x2a , // (field_number << 3) | wire_type
0xb , 0x8 , 0x80 , 0x92 , 0xb8 , 0xc3 , 0x98 , 0xfe , 0xff , 0xff , 0xff , 0x1 , // timestamp
0x32 , // (field_number << 3) | wire_type
0xd , 0x74 , 0x65 , 0x73 , 0x74 , 0x5f , 0x63 , 0x68 , 0x61 , 0x69 , 0x6e , 0x5f , 0x69 , 0x64 } , // chainID