Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rkapka committed Nov 29, 2022
1 parent 266379a commit 1929424
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions consensus-types/blocks/proto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1243,9 +1243,9 @@ func getFields() fields {
},
Withdrawals: []*enginev1.Withdrawal{
{
WithdrawalIndex: 128,
ExecutionAddress: b20,
Amount: 128,
Index: 128,
Address: b20,
Amount: 128,
},
},
}
Expand Down
18 changes: 9 additions & 9 deletions encoding/ssz/htrutils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,17 @@ func TestWithdrawalRoot(t *testing.T) {
{
name: "empty",
input: &enginev1.Withdrawal{
ExecutionAddress: make([]byte, 20),
Address: make([]byte, 20),
},
want: [32]byte{0xdb, 0x56, 0x11, 0x4e, 0x0, 0xfd, 0xd4, 0xc1, 0xf8, 0x5c, 0x89, 0x2b, 0xf3, 0x5a, 0xc9, 0xa8, 0x92, 0x89, 0xaa, 0xec, 0xb1, 0xeb, 0xd0, 0xa9, 0x6c, 0xde, 0x60, 0x6a, 0x74, 0x8b, 0x5d, 0x71},
},
{
name: "non-empty",
input: &enginev1.Withdrawal{
WithdrawalIndex: 123,
ValidatorIndex: 123123,
ExecutionAddress: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0},
Amount: 50,
Index: 123,
ValidatorIndex: 123123,
Address: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0},
Amount: 50,
},
want: [32]byte{0x4f, 0xca, 0x3a, 0x43, 0x6e, 0xcc, 0x34, 0xad, 0x33, 0xde, 0x3c, 0x22, 0xa3, 0x32, 0x27, 0xa, 0x8c, 0x4e, 0x75, 0xd8, 0x39, 0xc1, 0xd7, 0x55, 0x78, 0x77, 0xd7, 0x14, 0x6b, 0x34, 0x6a, 0xb6},
},
Expand Down Expand Up @@ -213,10 +213,10 @@ func TestWithrawalSliceRoot(t *testing.T) {
{
name: "non-empty",
input: []*enginev1.Withdrawal{&enginev1.Withdrawal{
WithdrawalIndex: 123,
ValidatorIndex: 123123,
ExecutionAddress: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0},
Amount: 50,
Index: 123,
ValidatorIndex: 123123,
Address: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0},
Amount: 50,
},
},
want: [32]byte{0x10, 0x34, 0x29, 0xd1, 0x34, 0x30, 0xa0, 0x1c, 0x4, 0xdd, 0x3, 0xed, 0xe6, 0xa6, 0x33, 0xb2, 0xc9, 0x24, 0x23, 0x5c, 0x43, 0xca, 0xb2, 0x32, 0xaa, 0xed, 0xfe, 0xd5, 0x9, 0x78, 0xd1, 0x6f},
Expand Down

0 comments on commit 1929424

Please sign in to comment.