dashpay/dashj

Version code of address did not match acceptable versions for network

Closed this issue · 1 comments

        NetworkParameters params = MainNetParams.get();

        WalletAppKit kit = new WalletAppKit(params, new File("."), "test");

        kit.startAsync();
        kit.awaitRunning();
        System.out.println(kit.wallet().toString());
        
        Coin value = Coin.parseCoin("1");

        Address to = Address.fromBase58(params, "to_address");
        System.out.println("Wallet information : " + kit.wallet().toString());

I was trying this code to load wallet from file and sending some coin on MainNet, but somehow it throws this error :

Exception in thread "main" org.bitcoinj.core.WrongNetworkException: Version code of address did not match acceptable versions for network: 140 not in [76, 16]
	at org.bitcoinj.core.Address.<init>(Address.java:113)
	at org.bitcoinj.core.Address.fromBase58(Address.java:93)
	at org.bitcoinj.examples.Main.main(Main.java:39)

Seems like the initiation of Address for variable to is having error inside, any advice for this one ? (I tried same piece of code on TestNet3params and its working)

This is due to the non-existence wallet on the network