StoredBlock: rework comment about usage of serializeCompact(), deserializeCompact()

The explicit list of usages was already stale. Rather, just mention
it's being used internally.
This commit is contained in:
Andreas Schildbach 2024-06-27 09:05:38 +02:00
parent a05fc05e56
commit 39f409f351

View file

@ -124,7 +124,11 @@ public class StoredBlock {
return store.get(getHeader().getPrevBlockHash()); 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) { public void serializeCompact(ByteBuffer buffer) {
byte[] chainWorkBytes = ByteUtils.bigIntegerToBytes(getChainWork(), CHAIN_WORK_BYTES); byte[] chainWorkBytes = ByteUtils.bigIntegerToBytes(getChainWork(), CHAIN_WORK_BYTES);
if (chainWorkBytes.length < CHAIN_WORK_BYTES) { if (chainWorkBytes.length < CHAIN_WORK_BYTES) {
@ -138,8 +142,7 @@ public class StoredBlock {
} }
/** /**
* Deserializes the stored block from a custom packed format. Used by {@link CheckpointManager} and * Deserializes the stored block from a custom packed format. Used internally.
* {@link SPVBlockStore}.
* *
* @param buffer data to deserialize * @param buffer data to deserialize
* @return deserialized stored block * @return deserialized stored block