From 39f409f351b069a7f76cd5a01ca3026e62bc2d1b Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Thu, 27 Jun 2024 09:05:38 +0200 Subject: [PATCH] StoredBlock: rework comment about usage of serializeCompact(), deserializeCompact() The explicit list of usages was already stale. Rather, just mention it's being used internally. --- core/src/main/java/org/bitcoinj/core/StoredBlock.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/core/StoredBlock.java b/core/src/main/java/org/bitcoinj/core/StoredBlock.java index f7288b355ae..927e550d25d 100644 --- a/core/src/main/java/org/bitcoinj/core/StoredBlock.java +++ b/core/src/main/java/org/bitcoinj/core/StoredBlock.java @@ -124,7 +124,11 @@ public StoredBlock getPrev(BlockStore store) throws BlockStoreException { return store.get(getHeader().getPrevBlockHash()); } - /** Serializes the stored block to a custom packed format. Used by {@link CheckpointManager}. */ + /** + * Serializes the stored block to a custom packed format. Used internally. + * + * @param buffer buffer to write to + */ public void serializeCompact(ByteBuffer buffer) { byte[] chainWorkBytes = ByteUtils.bigIntegerToBytes(getChainWork(), CHAIN_WORK_BYTES); if (chainWorkBytes.length < CHAIN_WORK_BYTES) { @@ -138,8 +142,7 @@ public void serializeCompact(ByteBuffer buffer) { } /** - * Deserializes the stored block from a custom packed format. Used by {@link CheckpointManager} and - * {@link SPVBlockStore}. + * Deserializes the stored block from a custom packed format. Used internally. * * @param buffer data to deserialize * @return deserialized stored block