Author

Topic: testnet accepts main net addresses (Read 900 times)

legendary
Activity: 1176
Merit: 1233
May Bitcoin be touched by his Noodly Appendage
August 03, 2011, 11:44:32 AM
#3
It is only an historical accident that it was named a version byte
No: https://bitcointalksearch.org/topic/m.401835
If you sent coins to the wrong network, just use pywallet
hero member
Activity: 812
Merit: 1022
No Maps for These Territories
August 03, 2011, 04:05:40 AM
#2
Yes, the current way is not optimal.

There have been already some proposals on the mailing list for new version byte layouts, might be an idea to adopt one of those eventually.
lfm
full member
Activity: 196
Merit: 104
August 03, 2011, 03:48:38 AM
#1
I find it is inexplicable and inconvenient to an extreme that the client running testnet accepts mainnet addresses. Could we please fix this. It is just a one line fix.

in base58.h: change line:
     return (nVersion <= ADDRESSVERSION);
to:
     return (nVersion == ADDRESSVERSION);

I don't see any practical reason for it to be the way it is. It is only an historical accident that it was named a version byte. It is not a version byte and has never been a version byte. If some day we do need/want to use it as a version byte we will need to rewrite the code in question anyway as I see it.

Meanwhile it is used as a net id byte for addresses and I think it is a mistake to use addresses from another net and the net id byte can be used to detect when you are trying to use an address with the wrong net and prevent your mistake.

Thank you.
Jump to: