Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong committed Nov 26, 2024
1 parent b833ea2 commit 90192b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions relayer/relays/beefy/parameters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ func TestCleanSignatureNochange(t *testing.T) {
s, err := util.HexStringTo32Bytes("0x6dc0d1a7743c3328bfcfe05a2f8691e114f9143776a461ddad6e8b858bb19c1d")
v := byte(28)
signature := buildSignature(v, r, s)
vAfter, rAfter, sAfter, err := CleanSignature(signature)
vAfter, rAfter, sAfter, reverted, err := CleanSignature(signature)
if err != nil {
t.Fatal(err)
}
assert.Equal(t, reverted, false)
assert.Equal(t, vAfter, v)
assert.Equal(t, rAfter, r)
assert.Equal(t, sAfter, s)

}

func TestCleanSignatureWithSConverted(t *testing.T) {
Expand All @@ -32,10 +32,11 @@ func TestCleanSignatureWithSConverted(t *testing.T) {
negativeS, err := util.HexStringTo32Bytes("0x6dc0d1a7743c3328bfcfe05a2f8691e114f9143776a461ddad6e8b858bb19c1d")
negativeV := byte(28)

vAfter, rAfter, sAfter, err := CleanSignature(signature)
vAfter, rAfter, sAfter, reverted, err := CleanSignature(signature)
if err != nil {
t.Fatal(err)
}
assert.Equal(t, reverted, true)
assert.Equal(t, vAfter, negativeV)
assert.Equal(t, rAfter, r)
assert.Equal(t, sAfter, negativeS)
Expand Down

0 comments on commit 90192b0

Please sign in to comment.