Synchronisation API and related refactorings / improvements

-> lets you synchronize with the Bitmessage network without staying connected
This commit is contained in:
2015-10-07 21:50:41 +02:00
parent c3fdee79ca
commit f9ff22bebe
13 changed files with 154 additions and 49 deletions

View File

@ -310,6 +310,8 @@ public class Connection implements Runnable {
try {
LOG.debug("Received object " + objectMessage.getInventoryVector());
security().checkProofOfWork(objectMessage, ctx.getNetworkNonceTrialsPerByte(), ctx.getNetworkExtraBytes());
if (ctx.getInventory().contains(objectMessage))
break;
listener.receive(objectMessage);
ctx.getInventory().storeObject(objectMessage);
// offer object to some random nodes so it gets distributed throughout the network: