do not try to download already saved blocks from upload
parent
91c1e22324
commit
40ea61707f
2
Makefile
2
Makefile
|
@ -27,7 +27,7 @@ test:
|
|||
|
||||
soft-reset:
|
||||
@echo "Soft-resetting Onionr..."
|
||||
rm -f onionr/data/blocks/*.dat onionr/data/*.db | true > /dev/null 2>&1
|
||||
rm -f onionr/data/blocks/*.dat onionr/data/*.db onionr/data/block-nonces.dat | true > /dev/null 2>&1
|
||||
@./RUN-LINUX.sh version | grep -v "Failed" --color=always
|
||||
|
||||
reset:
|
||||
|
|
|
@ -186,6 +186,10 @@ class OnionrCommunicatorDaemon:
|
|||
if blockHash in self.currentDownloading:
|
||||
logger.debug('ALREADY DOWNLOADING ' + blockHash)
|
||||
continue
|
||||
if blockHash in self._core.getBlockList():
|
||||
logger.debug('%s is already saved' % (blockHash,))
|
||||
self.blockQueue.remove(blockHash)
|
||||
continue
|
||||
self.currentDownloading.append(blockHash)
|
||||
logger.info("Attempting to download %s..." % blockHash)
|
||||
peerUsed = self.pickOnlinePeer()
|
||||
|
|
|
@ -57,8 +57,8 @@
|
|||
"blockCacheTotal": 50000000
|
||||
},
|
||||
"peers":{
|
||||
"minimumScore": -1000,
|
||||
"maxStoredPeers": 100,
|
||||
"maxConnect": 3
|
||||
"minimumScore": -100,
|
||||
"maxStoredPeers": 500,
|
||||
"maxConnect": 5
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue