Jakub Sokołowski 768539255a
skip EventMsgDelete events in Status
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-15 12:00:24 +02:00

19 lines
441 B
Go

package status
import (
"crypto/ecdsa"
"encoding/hex"
crypto "github.com/ethereum/go-ethereum/crypto"
)
func publicKeyToHex(pubkey *ecdsa.PublicKey) string {
return "0x" + hex.EncodeToString(crypto.FromECDSAPub(pubkey))
}
// isPubKeyEqual checks that two public keys are equal
func isPubKeyEqual(a, b *ecdsa.PublicKey) bool {
// the curve is always the same, just compare the points
return a.X.Cmp(b.X) == 0 && a.Y.Cmp(b.Y) == 0
}