* RouterInfo: Add method to validate sig during read-in for speed

This commit is contained in:
zzz
2012-03-27 20:25:26 +00:00
parent dc402acd4a
commit fbd230f21e
2 changed files with 53 additions and 9 deletions

View File

@@ -424,7 +424,7 @@ class PersistentDataStore extends TransientDataStore {
fis = new FileInputStream(_routerFile);
fis = new BufferedInputStream(fis);
RouterInfo ri = new RouterInfo();
ri.readBytes(fis);
ri.readBytes(fis, true); // true = verify sig on read
if (ri.getNetworkId() != Router.NETWORK_ID) {
corrupt = true;
if (_log.shouldLog(Log.ERROR))