@Override public synchronized final void setVerifiedChainHead(StoredBlock chainHead) throws BlockStoreException { Preconditions.checkNotNull(blockMap, "MemoryFullPrunedBlockStore is closed"); this.verifiedChainHead = chainHead; if (this.chainHead.getHeight() < chainHead.getHeight()) setChainHead(chainHead); // Potential leak here if not all blocks get setChainHead'd // Though the FullPrunedBlockStore allows for this, the current AbstractBlockChain will not do it. fullBlockMap.removeByMultiKey(chainHead.getHeight() - fullStoreDepth); }
@Override public synchronized final void setVerifiedChainHead(StoredBlock chainHead) throws BlockStoreException { Preconditions.checkNotNull(blockMap, "MemoryFullPrunedBlockStore is closed"); this.verifiedChainHead = chainHead; if (this.chainHead.getHeight() < chainHead.getHeight()) setChainHead(chainHead); // Potential leak here if not all blocks get setChainHead'd // Though the FullPrunedBlockStore allows for this, the current AbstractBlockChain will not do it. fullBlockMap.removeByMultiKey(chainHead.getHeight() - fullStoreDepth); }
@Override public synchronized final void setVerifiedChainHead(StoredBlock chainHead) throws BlockStoreException { Preconditions.checkNotNull(blockMap, "MemoryFullPrunedBlockStore is closed"); this.verifiedChainHead = chainHead; if (this.chainHead.getHeight() < chainHead.getHeight()) setChainHead(chainHead); // Potential leak here if not all blocks get setChainHead'd // Though the FullPrunedBlockStore allows for this, the current AbstractBlockChain will not do it. fullBlockMap.removeByMultiKey(chainHead.getHeight() - fullStoreDepth); }
@Override public synchronized final void setVerifiedChainHead(StoredBlock chainHead) throws BlockStoreException { Preconditions.checkNotNull(blockMap, "MemoryFullPrunedBlockStore is closed"); this.verifiedChainHead = chainHead; if (this.chainHead.getHeight() < chainHead.getHeight()) setChainHead(chainHead); // Potential leak here if not all blocks get setChainHead'd // Though the FullPrunedBlockStore allows for this, the current AbstractBlockChain will not do it. fullBlockMap.removeByMultiKey(chainHead.getHeight() - fullStoreDepth); }