3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-07 06:44:16 +00:00

Use blocking PeerGroup startup in WalletTool

This commit is contained in:
Mike Hearn 2013-01-10 14:11:29 +01:00
parent 43e8752ef8
commit 93870110c3

View File

@ -411,7 +411,7 @@ public class WalletTool {
}
t = req.tx; // Not strictly required today.
setup();
peers.start();
peers.startAndWait();
// Wait for peers to connect, the tx to be sent to one of them and for it to be propagated across the
// network. Once propagation is complete and we heard the transaction back from all our peers, it will
// be committed to the wallet.
@ -548,7 +548,7 @@ public class WalletTool {
setup();
int startTransactions = wallet.getTransactions(true, true).size();
DownloadListener listener = new DownloadListener();
peers.start();
peers.startAndWait();
peers.startBlockChainDownload(listener);
try {
listener.await();