mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-13 02:35:52 +00:00
Peer: Bug fix for the case where we don't want to download even block headers.
This commit is contained in:
parent
6c733b2f22
commit
c30df6ca25
@ -1216,7 +1216,6 @@ public class Peer extends PeerSocketHandler {
|
||||
public void setDownloadParameters(long secondsSinceEpoch, boolean useFilteredBlocks) {
|
||||
lock.lock();
|
||||
try {
|
||||
Preconditions.checkNotNull(blockChain);
|
||||
if (secondsSinceEpoch == 0) {
|
||||
fastCatchupTimeSecs = params.getGenesisBlock().getTimeSeconds();
|
||||
downloadBlockBodies = true;
|
||||
@ -1224,9 +1223,8 @@ public class Peer extends PeerSocketHandler {
|
||||
fastCatchupTimeSecs = secondsSinceEpoch;
|
||||
// If the given time is before the current chains head block time, then this has no effect (we already
|
||||
// downloaded everything we need).
|
||||
if (fastCatchupTimeSecs > blockChain.getChainHead().getHeader().getTimeSeconds()) {
|
||||
if (blockChain != null && fastCatchupTimeSecs > blockChain.getChainHead().getHeader().getTimeSeconds())
|
||||
downloadBlockBodies = false;
|
||||
}
|
||||
}
|
||||
this.useFilteredBlocks = useFilteredBlocks;
|
||||
} finally {
|
||||
|
Loading…
x
Reference in New Issue
Block a user