Skip to content

Commit

Permalink
bug fixed (only first era is routed).
Browse files Browse the repository at this point in the history
  • Loading branch information
thsc42 committed Dec 10, 2021
1 parent 8f88cef commit 299ebb8
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/main/java/net/sharksystem/asap/engine/ASAPEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -583,16 +583,22 @@ public void handleASAPInterest(ASAP_Interest_PDU_1_0 asapInterest, ASAP_1_0 prot
Map<String, Integer> encounterMap = asapInterest.getEncounterMap();
Log.writeLog(this, this.toString(), "received encounterMap: " + encounterMap);

/*
// am I in encounter list?
if(encounterMap != null) {
int eraEncounter = encounterMap.get(this.owner);
if(ASAP.isEraInRange(eraEncounter, this.getOldestEra(), workingEra)) {
// this seems to be a valid era - maybe got routed data
workingEra = eraEncounter;
Integer eraEncounteredMe = encounterMap.get(this.owner);
if(eraEncounteredMe != null) {
int eraEncounter = eraEncounteredMe;
Log.writeLog(this, this.toString(), "found me in encounter map: " + encounterMap);
// would start with next era
eraEncounter = ASAP.nextEra(eraEncounter);
if (eraEncounter != workingEra && ASAP.isEraInRange(eraEncounter, this.getOldestEra(), workingEra)) {
// this seems to be a valid era - maybe got routed data
Log.writeLog(this, this.toString(),
"change 1st era from " + workingEra + " to " + eraEncounter);
workingEra = eraEncounter;
}
}
}
*/

Log.writeLog(this, this.toString(), "transmit chunks from " + workingEra + " to era: " + this.era);

Expand Down

0 comments on commit 299ebb8

Please sign in to comment.