mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-08-01 12:31:23 +00:00
PeerGroup.startBlockChainDownload(): add the supplied listener to the
downloadingPeer
This commit is contained in:
committed by
Mike Hearn
parent
12bfa5f5ee
commit
d1c3be126d
@@ -1004,6 +1004,8 @@ public class PeerGroup extends AbstractExecutionThreadService implements Transac
|
|||||||
try {
|
try {
|
||||||
if (downloadPeer != null && this.downloadListener != null)
|
if (downloadPeer != null && this.downloadListener != null)
|
||||||
downloadPeer.removeEventListener(this.downloadListener);
|
downloadPeer.removeEventListener(this.downloadListener);
|
||||||
|
if (downloadPeer != null && listener != null)
|
||||||
|
downloadPeer.addEventListener(listener);
|
||||||
this.downloadListener = listener;
|
this.downloadListener = listener;
|
||||||
// TODO: be more nuanced about which peer to download from. We can also try
|
// 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
|
// downloading from multiple peers and handle the case when a new peer comes along
|
||||||
|
Reference in New Issue
Block a user