mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 05:27:17 +00:00
Rename variable peers to peerGroup, as the name can be misleading.
This commit is contained in:
@@ -61,12 +61,12 @@ public class RestoreFromSeed {
|
||||
// Setting up the BlochChain, the BlocksStore and connecting to the network.
|
||||
SPVBlockStore chainStore = new SPVBlockStore(params, chainFile);
|
||||
BlockChain chain = new BlockChain(params, chainStore);
|
||||
PeerGroup peers = new PeerGroup(params, chain);
|
||||
peers.addPeerDiscovery(new DnsDiscovery(params));
|
||||
PeerGroup peerGroup = new PeerGroup(params, chain);
|
||||
peerGroup.addPeerDiscovery(new DnsDiscovery(params));
|
||||
|
||||
// Now we need to hook the wallet up to the blockchain and the peers. This registers event listeners that notify our wallet about new transactions.
|
||||
chain.addWallet(wallet);
|
||||
peers.addWallet(wallet);
|
||||
peerGroup.addWallet(wallet);
|
||||
|
||||
DownloadProgressTracker bListener = new DownloadProgressTracker() {
|
||||
@Override
|
||||
@@ -76,8 +76,8 @@ public class RestoreFromSeed {
|
||||
};
|
||||
|
||||
// Now we re-download the blockchain. This replays the chain into the wallet. Once this is completed our wallet should know of all its transactions and print the correct balance.
|
||||
peers.start();
|
||||
peers.startBlockChainDownload(bListener);
|
||||
peerGroup.start();
|
||||
peerGroup.startBlockChainDownload(bListener);
|
||||
|
||||
bListener.await();
|
||||
|
||||
@@ -85,6 +85,6 @@ public class RestoreFromSeed {
|
||||
System.out.println(wallet.toString());
|
||||
|
||||
// shutting down again
|
||||
peers.stop();
|
||||
peerGroup.stop();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user