<p>Quoting Suhas Daftuar's response to the issue you opened:</p>

<blockquote>
  <p>In 0.16, we changed the consensus parameters for regtest so that segwit was always active. This was mentioned briefly in the release notes <a href="https://github.com/bitcoin/bitcoin/blob/v0.16.0/doc/release-notes.md#testing-changes" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/v0.16.0/doc/release-notes.md#testing-changes</a>, along with a workaround to replicate the old behavior.</p>
  
  <p>I am surprised that you're not seeing the assertion failure mentioned in the release notes, but I suspect this is the cause of what you're seeing.</p>
</blockquote>

<p>So this is expected, but only affects regtest.</p>

CC BY-SA 3.0
2018-04-05T05:07:32.347Z
2018-04-05T05:07:32.347Z
Pieter Wuille
<p>I've been running bitcoin core 0.15 as regtest, and had X bitcoin in my balance all are from legacy output addresses, As I upgraded to 0.16 core version check in debug the legacy addresses are still validated as mine. but no balance. I wonder will this happen as I will upgrade my wallet at the mainnet as well ?<br>
I wish to be able and support creation of legacy address and SegWit on the same wallet and as of comments on <a href="https://bitcoin.stackexchange.com/questions/57832/how-to-generate-segwit-address/57836?noredirect=1#comment84934_57836">How to generate SegWit address</a> I see I will need to run bitcoin core each time with a new param "-addresstype=legacy" to enable it, so is there a better way ? </p>

<p>[edit 1] - I should/need to run with same "-datadir" arg ?<br>
[edit 2] - I run it under same -datadir.<br>
[edit 3] - I’ve opened issue 
<a href="https://github.com/bitcoin/bitcoin/issues/12872" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/issues/12872</a></p>

CC BY-SA 3.0
2018-04-03T18:51:25.143Z
That sounds like a bug. Are you sure? There is extensive testing before release. No balance should ever disappear when upgrading; all your old legacy addresses remain valid; the default addresstype just affects the type of newly created ones.
Pieter Wuille
CC BY-SA 3.0
2018-04-03T18:56:01.783Z
This is regtest. I had bitcoin core 0.15.1 running regtest with balance of 5000 bitcoins and after upgrading to 0.16 I have 0 balance while on console window validateaddress of legacy address from the 0.15.1 version regtest returns   "ismine": true.
Haddar Macdasi
CC BY-SA 3.0
2018-04-03T19:01:18.910Z
If you go back to 0.15.1, is the balance still there? Are you sure it's fully synchronized, running in the same directory, ... If you believe the balance actually disappeared in 0.16, please file a bug: https://github.com/bitcoin/bitcoin/issues
Pieter Wuille
CC BY-SA 3.0
2018-04-03T19:11:57.083Z
I want back to 0.15.1, I can see in transaction tab only the newly mined from the 0.16, when I generate payment address it's legacy. when I validate the SegWit address it's valid mine but no issegwit key. So I believe that all got to do with the fact that all this testing done on regtest env.
Haddar Macdasi
CC BY-SA 3.0
2018-04-03T19:17:45.577Z
Yes of course you should run with the same `-datadir`. Otherwise you're working in a completely independent environment with its own wallet.
Pieter Wuille
CC BY-SA 3.0
2018-04-03T19:18:54.260Z
I run with the same, I have a .bat file with "-datadir" arg inside.
Haddar Macdasi
CC BY-SA 3.0
2018-04-03T19:21:27.913Z
That's why it validates different address from different core version as "ismine : true".
Haddar Macdasi
<bitcoin-core><segregated-witness>
How to add support for segwit address and legacy with bitcoin core 0.16?
Haddar Macdasi
# How to add support for segwit address and legacy with bitcoin core 0.16?

(Asked by: username_0 on 2018-04-03)

I've been running bitcoin core 0.15 as regtest, and had X bitcoin in my balance all are from legacy output addresses, As I upgraded to 0.16 core version check in debug the legacy addresses are still validated as mine. but no balance. I wonder will this happen as I will upgrade my wallet at the mainnet as well ?  
I wish to be able and support creation of legacy address and SegWit on the same wallet and as of comments on [How to generate SegWit address](https://bitcoin.stackexchange.com/questions/57832/how-to-generate-segwit-address/57836?noredirect=1#comment84934_57836) I see I will need to run bitcoin core each time with a new param "-addresstype=legacy" to enable it, so is there a better way ?

[edit 1] - I should/need to run with same "-datadir" arg ?  
[edit 2] - I run it under same -datadir.  
[edit 3] - I’ve opened issue
<https://github.com/bitcoin/bitcoin/issues/12872>

**Tags:** bitcoin-core, segregated-witness

> **Comments:**
> **username_1**: That sounds like a bug. Are you sure? There is extensive testing before release. No balance should ever disappear when upgrading; all your old legacy addresses remain valid; the default addresstype just affects the type of newly created ones.  
> **username_0**: This is regtest. I had bitcoin core 0.15.1 running regtest with balance of 5000 bitcoins and after upgrading to 0.16 I have 0 balance while on console window validateaddress of legacy address from the 0.15.1 version regtest returns   "ismine": true.  
> **username_1**: If you go back to 0.15.1, is the balance still there? Are you sure it's fully synchronized, running in the same directory, ... If you believe the balance actually disappeared in 0.16, please file a bug: https://github.com/bitcoin/bitcoin/issues  
> **username_0**: I want back to 0.15.1, I can see in transaction tab only the newly mined from the 0.16, when I generate payment address it's legacy. when I validate the SegWit address it's valid mine but no issegwit key. So I believe that all got to do with the fact that all this testing done on regtest env.  
> **username_1**: Yes of course you should run with the same `-datadir`. Otherwise you're working in a completely independent environment with its own wallet.  
> **username_0**: I run with the same, I have a .bat file with "-datadir" arg inside.  
> **username_0**: That's why it validates different address from different core version as "ismine : true".  

---

## 1 answers

### Answer by username_1 on 2018-04-05. Score: 1 | Accepted answer

Quoting Suhas Daftuar's response to the issue you opened:

> In 0.16, we changed the consensus parameters for regtest so that segwit was always active. This was mentioned briefly in the release notes <https://github.com/bitcoin/bitcoin/blob/v0.16.0/doc/release-notes.md#testing-changes>, along with a workaround to replicate the old behavior.
>
> I am surprised that you're not seeing the assertion failure mentioned in the release notes, but I suspect this is the cause of what you're seeing.

So this is expected, but only affects regtest.


---

