From de653cc42dd3550fe510f16dd2ef00c5b6ac5138 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Wed, 6 Mar 2013 13:47:09 +0100 Subject: [PATCH] Mark BoundedOverheadBlockStore as deprecated. --- .../store/BoundedOverheadBlockStore.java | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/core/src/main/java/com/google/bitcoin/store/BoundedOverheadBlockStore.java b/core/src/main/java/com/google/bitcoin/store/BoundedOverheadBlockStore.java index 87863554..02d725b5 100644 --- a/core/src/main/java/com/google/bitcoin/store/BoundedOverheadBlockStore.java +++ b/core/src/main/java/com/google/bitcoin/store/BoundedOverheadBlockStore.java @@ -37,21 +37,16 @@ import java.util.Map; import static com.google.common.base.Preconditions.checkState; /** - * Stores the block chain to disk.

+ *

Stores the block chain to disk.

* - * This implementation is designed to have constant memory usage, regardless of the size of the block chain being - * stored. It exploits operating system level buffering and the fact that get() requests are, in normal usage, - * localized in chain space.

+ *

This class is deprecated and has been replaced with {@link SPVBlockStore}, which does the same thing but faster + * and using bounded disk space. The primary difference is that BoundedOverheadBlockStore stores all headers, whereas + * SPVBlockStore uses a ring buffer and discards older headers that are buried so deep they're unlikely to ever be + * needed to process a re-org.

* - * Blocks are stored sequentially. Most blocks are fetched out of a small in-memory cache. The slowest part is - * traversing difficulty transition points, which requires seeking backwards over around 2000 blocks. On a Google - * Nexus S phone this takes a couple of seconds. On a MacBook Pro it takes around 50msec.

- * - * The store has much room for optimization. Expanding the size of the cache will likely allow us to traverse - * difficulty transitions without using too much memory and without hitting the disk at all, for the case of initial - * block chain download. Storing the hashes on disk would allow us to avoid deserialization and hashing which is - * expensive on Android. + *

This class will eventually be deleted.

*/ +@Deprecated public class BoundedOverheadBlockStore implements BlockStore { private static final Logger log = LoggerFactory.getLogger(BoundedOverheadBlockStore.class); private static final byte FILE_FORMAT_VERSION = 1;