Bitcoin Forum
December 05, 2016, 08:56:56 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: testnet accepts main net addresses  (Read 677 times)
lfm
Full Member
***
Offline Offline

Activity: 196



View Profile
August 03, 2011, 07: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.
1480971416
Hero Member
*
Offline Offline

Posts: 1480971416

View Profile Personal Message (Offline)

Ignore
1480971416
Reply with quote  #2

1480971416
Report to moderator
1480971416
Hero Member
*
Offline Offline

Posts: 1480971416

View Profile Personal Message (Offline)

Ignore
1480971416
Reply with quote  #2

1480971416
Report to moderator
1480971416
Hero Member
*
Offline Offline

Posts: 1480971416

View Profile Personal Message (Offline)

Ignore
1480971416
Reply with quote  #2

1480971416
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480971416
Hero Member
*
Offline Offline

Posts: 1480971416

View Profile Personal Message (Offline)

Ignore
1480971416
Reply with quote  #2

1480971416
Report to moderator
1480971416
Hero Member
*
Offline Offline

Posts: 1480971416

View Profile Personal Message (Offline)

Ignore
1480971416
Reply with quote  #2

1480971416
Report to moderator
1480971416
Hero Member
*
Offline Offline

Posts: 1480971416

View Profile Personal Message (Offline)

Ignore
1480971416
Reply with quote  #2

1480971416
Report to moderator
wumpus
Hero Member
*****
qt
Offline Offline

Activity: 798

No Maps for These Territories


View Profile
August 03, 2011, 08: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.

Bitcoin Core developer [PGP] Warning: For most, coin loss is a larger risk than coin theft. A disk can die any time. Regularly back up your wallet through FileBackup Wallet to an external storage or the (encrypted!) cloud. Use a separate offline wallet for storing larger amounts.
jackjack
Hero Member
*****
Offline Offline

Activity: 868


May Bitcoin be touched by his Noodly Appendage


View Profile
August 03, 2011, 03:44:32 PM
 #3

It is only an historical accident that it was named a version byte
No: https://bitcointalk.org/index.php?topic=26808.msg401835#msg401835
If you sent coins to the wrong network, just use pywallet

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!