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

Skip to content
Snippets Groups Projects
Commit d81bff26 authored by zzz's avatar zzz
Browse files

* Outbound message:

      - Tweak the cache key for efficiency
parent 042399f2
No related branches found
No related tags found
No related merge requests found
...@@ -580,11 +580,12 @@ public class OutboundClientMessageOneShotJob extends JobImpl { ...@@ -580,11 +580,12 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
/** /**
* String used to cache things with based on source + dest * String used to cache things with based on source + dest
* Put the dest first to make string matching faster
*/ */
private String _hashPair; private String _hashPair;
private String hashPair() { private String hashPair() {
if (_hashPair == null) if (_hashPair == null)
_hashPair = _from.calculateHash().toBase64() + _to.calculateHash().toBase64(); _hashPair = _to.calculateHash().toBase64() + _from.calculateHash().toBase64();
return _hashPair; return _hashPair;
} }
...@@ -594,7 +595,7 @@ public class OutboundClientMessageOneShotJob extends JobImpl { ...@@ -594,7 +595,7 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
* 44 = 32 * 4 / 3 * 44 = 32 * 4 / 3
*/ */
private Hash sourceFromHashPair(String s) { private Hash sourceFromHashPair(String s) {
return new Hash(Base64.decode(s.substring(0, 44))); return new Hash(Base64.decode(s.substring(44, 88)));
} }
/** /**
......
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