mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-24 14:35:53 +00:00
fix verion checking logic
This commit is contained in:
parent
d7d3c72cf3
commit
73db64d991
@ -173,15 +173,15 @@ func CheckIfAddressIsValid(addr string, expectedPrefix Bech32Prefix) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
if version != pubKeyAddrID {
|
||||
return false
|
||||
} else if version != pubKeyECDSAAddrID {
|
||||
return false
|
||||
} else if version != scriptHashAddrID {
|
||||
return false
|
||||
if version == pubKeyAddrID {
|
||||
return true
|
||||
} else if version == pubKeyECDSAAddrID {
|
||||
return true
|
||||
} else if version == scriptHashAddrID {
|
||||
return true
|
||||
}
|
||||
|
||||
return true
|
||||
return false
|
||||
}
|
||||
|
||||
// PublicKeySize is the public key size for a schnorr public key
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user