mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-20 10:12:19 +01:00
PeerGroup.startBlockChainDownload(): add the supplied listener to the
downloadingPeer
This commit is contained in:
parent
12bfa5f5ee
commit
d1c3be126d
@ -1004,6 +1004,8 @@ public class PeerGroup extends AbstractExecutionThreadService implements Transac
|
||||
try {
|
||||
if (downloadPeer != null && this.downloadListener != null)
|
||||
downloadPeer.removeEventListener(this.downloadListener);
|
||||
if (downloadPeer != null && listener != null)
|
||||
downloadPeer.addEventListener(listener);
|
||||
this.downloadListener = listener;
|
||||
// TODO: be more nuanced about which peer to download from. We can also try
|
||||
// downloading from multiple peers and handle the case when a new peer comes along
|
||||
|
Loading…
Reference in New Issue
Block a user