mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-19 09:50:32 +01:00
Examples: demo.js to use current PeerGroup start() API
This commit is contained in:
parent
db42dc4630
commit
7666d84625
@ -56,8 +56,7 @@ bcj.utils.BriefLogFormatter.init();
|
||||
var PeerGroup = bcj.core.PeerGroup;
|
||||
var pg = new PeerGroup(params)
|
||||
pg.addPeerDiscovery(new bcj.net.discovery.DnsDiscovery(params));
|
||||
pg.startAsync();
|
||||
pg.awaitRunning();
|
||||
pg.start();
|
||||
|
||||
// Wait until we have at least three peers.
|
||||
print("Waiting for some peers")
|
||||
|
Loading…
Reference in New Issue
Block a user