Skip to content

Commit

Permalink
Fix formatting of address
Browse files Browse the repository at this point in the history
  • Loading branch information
muXxer committed Aug 25, 2022
1 parent 95b4ca7 commit 9777306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion signature_ed25519.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (e *Ed25519Signature) Valid(msg []byte, addr *Ed25519Address) error {
// an address is the Blake2b 256 hash of the public key
addrFromPubKey := Ed25519AddressFromPubKey(e.PublicKey[:])
if !bytes.Equal(addr[:], addrFromPubKey[:]) {
return fmt.Errorf("%w: address %s, address from public key %v", ErrEd25519PubKeyAndAddrMismatch, EncodeHex(addr[:]), addrFromPubKey)
return fmt.Errorf("%w: address %s, address from public key %v", ErrEd25519PubKeyAndAddrMismatch, EncodeHex(addr[:]), EncodeHex(addrFromPubKey[:]))
}
if valid := iotagoEd25519.Verify(e.PublicKey[:], msg, e.Signature[:]); !valid {
return fmt.Errorf("%w: address %s, public key %v, signature %v", ErrEd25519SignatureInvalid, EncodeHex(addr[:]), EncodeHex(e.PublicKey[:]), EncodeHex(e.Signature[:]))
Expand Down

0 comments on commit 9777306

Please sign in to comment.