Compare commits

...

1 Commits

Author SHA1 Message Date
idk
118b90315b Add multihome flag 2023-07-03 14:22:00 -04:00
2 changed files with 10 additions and 0 deletions

View File

@ -64,6 +64,7 @@ public abstract class DatabaseEntry extends DataStructureImpl {
private long _routingKeyGenMod;
protected boolean _receivedAsPublished;
protected boolean _receivedAsReply;
protected boolean _possibleMultihome;
/**
* A common interface to the timestamp of the two subclasses.
@ -296,4 +297,12 @@ public abstract class DatabaseEntry extends DataStructureImpl {
public void setReceivedAsReply() {
_receivedAsReply = true;
}
public void setMultihome() {
_possibleMultihome = true;
}
public boolean getMultihome() {
return _possibleMultihome;
}
}

View File

@ -103,6 +103,7 @@ class HandleFloodfillDatabaseStoreMessageJob extends JobImpl {
if (!ls.getReceivedAsReply())
ls.setReceivedAsPublished();
if (getContext().clientManager().isLocal(key)) {
ls.setMultihome();
getContext().statManager().addRateData("netDb.storeLocalLeaseSetAttempt", 1, 0);
// throw rather than return, so that we send the ack below (prevent easy attack)
dontBlamePeer = true;