Use a local Bitcoin node if one is detected instead of the p2p network. This allows any user of a bitcoinj based app to upgrade from SPV to full mode security by just installing and running Core on the same machine. Can be controlled with a new property on PeerGroup.

This commit is contained in:
Mike Hearn
2014-07-29 18:13:52 +02:00
parent 812a4f59c4
commit 6679f42f4a
4 changed files with 105 additions and 18 deletions

View File

@@ -823,12 +823,12 @@ public class WalletTool {
}
} else if (!options.has("tor")) {
// If Tor mode then PeerGroup already has discovery set up.
if (params == RegTestParams.get()) {
log.info("Assuming regtest node on localhost");
peers.addAddress(PeerAddress.localhost(params));
} else {
// if (params == RegTestParams.get()) {
// log.info("Assuming regtest node on localhost");
// peers.addAddress(PeerAddress.localhost(params));
// } else {
peers.addPeerDiscovery(new DnsDiscovery(params));
}
//}
}
}