diff --git a/OpenCL/m16600_a0-optimized.cl b/OpenCL/m16600_a0-optimized.cl index 1d3b4871f..7cca797c1 100644 --- a/OpenCL/m16600_a0-optimized.cl +++ b/OpenCL/m16600_a0-optimized.cl @@ -392,7 +392,15 @@ KERNEL_FQ KERNEL_FA void m16600_m04 (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if (salt_type == 2) { - if ((u8) (out[0] >> 0) != 'x') continue; + u8 version = (u8) (out[0] >> 0); + + // https://github.com/spesmilo/electrum-docs/blob/master/xpub_version_bytes.rst + // Does not include testnet addresses + if (version != 'x' && + version != 'y' && + version != 'Y' && + version != 'z' && + version != 'Z' ) continue; if ((u8) (out[0] >> 8) != 'p') continue; if ((u8) (out[0] >> 16) != 'r') continue; if ((u8) (out[0] >> 24) != 'v') continue; @@ -804,7 +812,15 @@ KERNEL_FQ KERNEL_FA void m16600_s04 (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if (salt_type == 2) { - if ((u8) (out[0] >> 0) != 'x') continue; + u8 version = (u8) (out[0] >> 0); + + // https://github.com/spesmilo/electrum-docs/blob/master/xpub_version_bytes.rst + // Does not include testnet addresses + if (version != 'x' && + version != 'y' && + version != 'Y' && + version != 'z' && + version != 'Z' ) continue; if ((u8) (out[0] >> 8) != 'p') continue; if ((u8) (out[0] >> 16) != 'r') continue; if ((u8) (out[0] >> 24) != 'v') continue; diff --git a/OpenCL/m16600_a0-pure.cl b/OpenCL/m16600_a0-pure.cl index 40655d3b6..5e11ac656 100644 --- a/OpenCL/m16600_a0-pure.cl +++ b/OpenCL/m16600_a0-pure.cl @@ -206,7 +206,15 @@ KERNEL_FQ KERNEL_FA void m16600_mxx (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if (salt_type == 2) { - if ((u8) (out[0] >> 0) != 'x') continue; + u8 version = (u8) (out[0] >> 0); + + // https://github.com/spesmilo/electrum-docs/blob/master/xpub_version_bytes.rst + // Does not include testnet addresses + if (version != 'x' && + version != 'y' && + version != 'Y' && + version != 'z' && + version != 'Z' ) continue; if ((u8) (out[0] >> 8) != 'p') continue; if ((u8) (out[0] >> 16) != 'r') continue; if ((u8) (out[0] >> 24) != 'v') continue; @@ -424,7 +432,15 @@ KERNEL_FQ KERNEL_FA void m16600_sxx (KERN_ATTR_RULES_ESALT (electrum_wallet_t)) if (salt_type == 2) { - if ((u8) (out[0] >> 0) != 'x') continue; + u8 version = (u8) (out[0] >> 0); + + // https://github.com/spesmilo/electrum-docs/blob/master/xpub_version_bytes.rst + // Does not include testnet addresses + if (version != 'x' && + version != 'y' && + version != 'Y' && + version != 'z' && + version != 'Z' ) continue; if ((u8) (out[0] >> 8) != 'p') continue; if ((u8) (out[0] >> 16) != 'r') continue; if ((u8) (out[0] >> 24) != 'v') continue; diff --git a/OpenCL/m16600_a1-optimized.cl b/OpenCL/m16600_a1-optimized.cl index 0a51cd748..c8b9ee3de 100644 --- a/OpenCL/m16600_a1-optimized.cl +++ b/OpenCL/m16600_a1-optimized.cl @@ -448,7 +448,15 @@ KERNEL_FQ KERNEL_FA void m16600_m04 (KERN_ATTR_ESALT (electrum_wallet_t)) if (salt_type == 2) { - if ((u8) (out[0] >> 0) != 'x') continue; + u8 version = (u8) (out[0] >> 0); + + // https://github.com/spesmilo/electrum-docs/blob/master/xpub_version_bytes.rst + // Does not include testnet addresses + if (version != 'x' && + version != 'y' && + version != 'Y' && + version != 'z' && + version != 'Z' ) continue; if ((u8) (out[0] >> 8) != 'p') continue; if ((u8) (out[0] >> 16) != 'r') continue; if ((u8) (out[0] >> 24) != 'v') continue; @@ -918,7 +926,15 @@ KERNEL_FQ KERNEL_FA void m16600_s04 (KERN_ATTR_ESALT (electrum_wallet_t)) if (salt_type == 2) { - if ((u8) (out[0] >> 0) != 'x') continue; + u8 version = (u8) (out[0] >> 0); + + // https://github.com/spesmilo/electrum-docs/blob/master/xpub_version_bytes.rst + // Does not include testnet addresses + if (version != 'x' && + version != 'y' && + version != 'Y' && + version != 'z' && + version != 'Z' ) continue; if ((u8) (out[0] >> 8) != 'p') continue; if ((u8) (out[0] >> 16) != 'r') continue; if ((u8) (out[0] >> 24) != 'v') continue; diff --git a/OpenCL/m16600_a1-pure.cl b/OpenCL/m16600_a1-pure.cl index b654820c4..20fe1aebc 100644 --- a/OpenCL/m16600_a1-pure.cl +++ b/OpenCL/m16600_a1-pure.cl @@ -202,7 +202,15 @@ KERNEL_FQ KERNEL_FA void m16600_mxx (KERN_ATTR_ESALT (electrum_wallet_t)) if (salt_type == 2) { - if ((u8) (out[0] >> 0) != 'x') continue; + u8 version = (u8) (out[0] >> 0); + + // https://github.com/spesmilo/electrum-docs/blob/master/xpub_version_bytes.rst + // Does not include testnet addresses + if (version != 'x' && + version != 'y' && + version != 'Y' && + version != 'z' && + version != 'Z' ) continue; if ((u8) (out[0] >> 8) != 'p') continue; if ((u8) (out[0] >> 16) != 'r') continue; if ((u8) (out[0] >> 24) != 'v') continue; @@ -418,7 +426,15 @@ KERNEL_FQ KERNEL_FA void m16600_sxx (KERN_ATTR_ESALT (electrum_wallet_t)) if (salt_type == 2) { - if ((u8) (out[0] >> 0) != 'x') continue; + u8 version = (u8) (out[0] >> 0); + + // https://github.com/spesmilo/electrum-docs/blob/master/xpub_version_bytes.rst + // Does not include testnet addresses + if (version != 'x' && + version != 'y' && + version != 'Y' && + version != 'z' && + version != 'Z' ) continue; if ((u8) (out[0] >> 8) != 'p') continue; if ((u8) (out[0] >> 16) != 'r') continue; if ((u8) (out[0] >> 24) != 'v') continue; diff --git a/OpenCL/m16600_a3-optimized.cl b/OpenCL/m16600_a3-optimized.cl index 45760ab33..447a8a14c 100644 --- a/OpenCL/m16600_a3-optimized.cl +++ b/OpenCL/m16600_a3-optimized.cl @@ -167,7 +167,15 @@ DECLSPEC void m16600 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a if (salt_type == 2) { - if ((u8) (out[0] >> 0) != 'x') continue; + u8 version = (u8) (out[0] >> 0); + + // https://github.com/spesmilo/electrum-docs/blob/master/xpub_version_bytes.rst + // Does not include testnet addresses + if (version != 'x' && + version != 'y' && + version != 'Y' && + version != 'z' && + version != 'Z' ) continue; if ((u8) (out[0] >> 8) != 'p') continue; if ((u8) (out[0] >> 16) != 'r') continue; if ((u8) (out[0] >> 24) != 'v') continue; diff --git a/OpenCL/m16600_a3-pure.cl b/OpenCL/m16600_a3-pure.cl index a611b6759..bf97a1db7 100644 --- a/OpenCL/m16600_a3-pure.cl +++ b/OpenCL/m16600_a3-pure.cl @@ -215,7 +215,15 @@ KERNEL_FQ KERNEL_FA void m16600_mxx (KERN_ATTR_VECTOR_ESALT (electrum_wallet_t)) if (salt_type == 2) { - if ((u8) (out[0] >> 0) != 'x') continue; + u8 version = (u8) (out[0] >> 0); + + // https://github.com/spesmilo/electrum-docs/blob/master/xpub_version_bytes.rst + // Does not include testnet addresses + if (version != 'x' && + version != 'y' && + version != 'Y' && + version != 'z' && + version != 'Z' ) continue; if ((u8) (out[0] >> 8) != 'p') continue; if ((u8) (out[0] >> 16) != 'r') continue; if ((u8) (out[0] >> 24) != 'v') continue; @@ -444,7 +452,15 @@ KERNEL_FQ KERNEL_FA void m16600_sxx (KERN_ATTR_VECTOR_ESALT (electrum_wallet_t)) if (salt_type == 2) { - if ((u8) (out[0] >> 0) != 'x') continue; + u8 version = (u8) (out[0] >> 0); + + // https://github.com/spesmilo/electrum-docs/blob/master/xpub_version_bytes.rst + // Does not include testnet addresses + if (version != 'x' && + version != 'y' && + version != 'Y' && + version != 'z' && + version != 'Z' ) continue; if ((u8) (out[0] >> 8) != 'p') continue; if ((u8) (out[0] >> 16) != 'r') continue; if ((u8) (out[0] >> 24) != 'v') continue;