mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-13 10:45:51 +00:00
SPVBlockstore: Rename NOT_FOUND_MARKER and make it private.
This commit is contained in:
parent
175aea997d
commit
b70549a5ff
@ -68,7 +68,7 @@ public class SPVBlockStore implements BlockStore {
|
|||||||
//
|
//
|
||||||
// We don't care about the value in this cache. It is always notFoundMarker. Unfortunately LinkedHashSet does not
|
// We don't care about the value in this cache. It is always notFoundMarker. Unfortunately LinkedHashSet does not
|
||||||
// provide the removeEldestEntry control.
|
// provide the removeEldestEntry control.
|
||||||
protected static final Object notFoundMarker = new Object();
|
private static final Object NOT_FOUND_MARKER = new Object();
|
||||||
protected LinkedHashMap<Sha256Hash, Object> notFoundCache = new LinkedHashMap<Sha256Hash, Object>() {
|
protected LinkedHashMap<Sha256Hash, Object> notFoundCache = new LinkedHashMap<Sha256Hash, Object>() {
|
||||||
@Override
|
@Override
|
||||||
protected boolean removeEldestEntry(Map.Entry<Sha256Hash, Object> entry) {
|
protected boolean removeEldestEntry(Map.Entry<Sha256Hash, Object> entry) {
|
||||||
@ -214,7 +214,7 @@ public class SPVBlockStore implements BlockStore {
|
|||||||
}
|
}
|
||||||
} while (cursor != startingPoint);
|
} while (cursor != startingPoint);
|
||||||
// Not found.
|
// Not found.
|
||||||
notFoundCache.put(hash, notFoundMarker);
|
notFoundCache.put(hash, NOT_FOUND_MARKER);
|
||||||
return null;
|
return null;
|
||||||
} catch (ProtocolException e) {
|
} catch (ProtocolException e) {
|
||||||
throw new RuntimeException(e); // Cannot happen.
|
throw new RuntimeException(e); // Cannot happen.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user