3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-12 02:05:53 +00:00

Note about running time in BlockStore.getChainHead(). Resolves issue 191.

This commit is contained in:
Mike Hearn 2012-05-30 00:15:06 +02:00
parent 1f96f850e0
commit d9c2aabf66

View File

@ -44,7 +44,10 @@ public interface BlockStore {
StoredBlock get(Sha256Hash hash) throws BlockStoreException;
/**
* Returns the {@link StoredBlock} that represents the top of the chain of greatest total work.
* Returns the {@link StoredBlock} that represents the top of the chain of greatest total work. Note that this
* can be arbitrarily expensive, you probably should use {@link com.google.bitcoin.core.BlockChain#getChainHead()}
* or perhaps {@link com.google.bitcoin.core.BlockChain#getBestChainHeight()} which will run in constant time and
* not take any heavyweight locks.
*/
StoredBlock getChainHead() throws BlockStoreException;