I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit a23e09ca authored by eyedeekay's avatar eyedeekay
Browse files

Router: fix failed ant builds in unit tests

parent 00e33904
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ import net.i2p.data.DataFormatException; ...@@ -12,6 +12,7 @@ import net.i2p.data.DataFormatException;
import net.i2p.data.Hash; import net.i2p.data.Hash;
import net.i2p.data.router.RouterIdentity; import net.i2p.data.router.RouterIdentity;
import net.i2p.data.router.RouterInfo; import net.i2p.data.router.RouterInfo;
import net.i2p.router.RouterContext;
import net.i2p.data.i2np.DatabaseStoreMessage; import net.i2p.data.i2np.DatabaseStoreMessage;
import net.i2p.data.i2np.I2NPMessage; import net.i2p.data.i2np.I2NPMessage;
import net.i2p.data.i2np.I2NPMessageException; import net.i2p.data.i2np.I2NPMessageException;
...@@ -181,7 +182,7 @@ public class SSUDemo { ...@@ -181,7 +182,7 @@ public class SSUDemo {
} }
private void peerRead(RouterInfo ri) { 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) if (old == null)
newPeerRead(ri); newPeerRead(ri);
} }
...@@ -314,7 +315,7 @@ public class SSUDemo { ...@@ -314,7 +315,7 @@ public class SSUDemo {
DatabaseStoreMessage m = (DatabaseStoreMessage)_msg; DatabaseStoreMessage m = (DatabaseStoreMessage)_msg;
System.out.println("RECV: " + m); System.out.println("RECV: " + m);
try { try {
_us.netDbSegmentor().store(m.getKey(), (RouterInfo) m.getEntry()); _us.netDb().store(m.getKey(), (RouterInfo) m.getEntry());
} catch (IllegalArgumentException iae) { } catch (IllegalArgumentException iae) {
iae.printStackTrace(); iae.printStackTrace();
} }
......
...@@ -83,7 +83,7 @@ class UDPFlooder implements Runnable { ...@@ -83,7 +83,7 @@ class UDPFlooder implements Runnable {
m.setMessageExpiration(_context.clock().now() + 10*1000); m.setMessageExpiration(_context.clock().now() + 10*1000);
m.setUniqueId(_context.random().nextLong(I2NPMessage.MAX_ID_VALUE)); m.setUniqueId(_context.random().nextLong(I2NPMessage.MAX_ID_VALUE));
if (true) { if (true) {
RouterInfo to = _context.netDbSegmentor().lookupRouterInfoLocally(peer.getRemotePeer()); RouterInfo to = _context.netDb().lookupRouterInfoLocally(peer.getRemotePeer());
if (to == null) if (to == null)
continue; continue;
OutNetMessage msg = new OutNetMessage(_context, m, m.getMessageExpiration(), 500, to); OutNetMessage msg = new OutNetMessage(_context, m, m.getMessageExpiration(), 500, to);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment