Horrible hack to ensure WalletTool sends transactions. For some reason the socket gets torn down before it had a chance to write the packets out to the network.

This commit is contained in:
Mike Hearn 2012-06-07 10:55:15 +02:00
parent e863d01545
commit dffe7f1348

View File

@ -351,7 +351,10 @@ public class WalletTool {
}
setup();
peers.start();
peers.broadcastTransaction(t).get(); // The .get() is so we wait until the broadcast has completed.
peers.broadcastTransaction(t).get();
// Horrible hack to ensure we have time to fully broadcast to every peer. Will go away when we resolve
// issue 167.
Thread.sleep(2000);
wallet.commitTx(t);
System.out.println(t.getHashAsString());
} catch (BlockStoreException e) {