Skip to content

Commit

Permalink
Router: fix failed ant builds in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedeekay committed Oct 18, 2023
1 parent 00e3390 commit a23e09c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions router/java/test/junit/net/i2p/router/transport/SSUDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import net.i2p.data.Hash;
import net.i2p.data.router.RouterIdentity;
import net.i2p.data.router.RouterInfo;
import net.i2p.router.RouterContext;
import net.i2p.data.i2np.DatabaseStoreMessage;
import net.i2p.data.i2np.I2NPMessage;
import net.i2p.data.i2np.I2NPMessageException;
Expand Down Expand Up @@ -181,7 +182,7 @@ private void loadPeers() {
}

private void peerRead(RouterInfo ri) {
RouterInfo old = _us.netDbSegmentor().store(ri.getIdentity().calculateHash(), ri);
RouterInfo old = _us.netDb().store(ri.getIdentity().calculateHash(), ri);
if (old == null)
newPeerRead(ri);
}
Expand Down Expand Up @@ -314,7 +315,7 @@ public void runJob() {
DatabaseStoreMessage m = (DatabaseStoreMessage)_msg;
System.out.println("RECV: " + m);
try {
_us.netDbSegmentor().store(m.getKey(), (RouterInfo) m.getEntry());
_us.netDb().store(m.getKey(), (RouterInfo) m.getEntry());
} catch (IllegalArgumentException iae) {
iae.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void run() {
m.setMessageExpiration(_context.clock().now() + 10*1000);
m.setUniqueId(_context.random().nextLong(I2NPMessage.MAX_ID_VALUE));
if (true) {
RouterInfo to = _context.netDbSegmentor().lookupRouterInfoLocally(peer.getRemotePeer());
RouterInfo to = _context.netDb().lookupRouterInfoLocally(peer.getRemotePeer());
if (to == null)
continue;
OutNetMessage msg = new OutNetMessage(_context, m, m.getMessageExpiration(), 500, to);
Expand Down

0 comments on commit a23e09c

Please sign in to comment.