mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-01-19 05:43:51 +01:00
Forgot to add regtest byte comparison for testing if p2sh address is valid
This commit is contained in:
parent
f29d7e6f42
commit
c82d565439
@ -47,7 +47,8 @@ object BitcoinAddress {
|
|||||||
try {
|
try {
|
||||||
val base58decodeChecked : Array[Byte] = Base58.decodeChecked(address)
|
val base58decodeChecked : Array[Byte] = Base58.decodeChecked(address)
|
||||||
val firstByte = base58decodeChecked(0)
|
val firstByte = base58decodeChecked(0)
|
||||||
((firstByte == MainNet.p2shNetworkByte || firstByte == TestNet3.p2shNetworkByte) && base58decodeChecked.size == 21)
|
((firstByte == MainNet.p2shNetworkByte || firstByte == TestNet3.p2shNetworkByte || RegTest.p2shNetworkByte == firstByte)
|
||||||
|
&& base58decodeChecked.size == 21)
|
||||||
} catch {
|
} catch {
|
||||||
case _ : Throwable => false
|
case _ : Throwable => false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user