Skip to content

Commit

Permalink
chg: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
marcello33 committed Mar 18, 2024
1 parent 1549ca9 commit 7fc00b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions bridge/setu/util/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -709,5 +709,6 @@ func LogElapsedTimeForStateSyncedEvent(event interface{}, functionName string, s
func IsPubKeyFirstByteValid(pubKey []byte) bool {
prefix := make([]byte, 1)
prefix[0] = byte(0x04)

return bytes.Equal(prefix, pubKey[0:1])
}
3 changes: 2 additions & 1 deletion helper/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,10 @@ func (c *ContractCaller) SendTick(signedData []byte, sigs []byte, slashManagerAd
// StakeFor stakes for a validator
func (c *ContractCaller) StakeFor(val common.Address, stakeAmount *big.Int, feeAmount *big.Int, acceptDelegation bool, stakeManagerAddress common.Address, stakeManagerInstance *stakemanager.Stakemanager) error {
signerPubkey := GetPubKey()

prefix := make([]byte, 1)
prefix[0] = byte(0x04)

if !bytes.Equal(prefix, signerPubkey[0:1]) {
Logger.Error("public key first byte mismatch", "expected", "0x04", "received", signerPubkey[0:1])
return errors.New("public key first byte mismatch")
Expand Down

0 comments on commit 7fc00b1

Please sign in to comment.