mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 09:20:04 +01:00
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:
parent
a05fc05e56
commit
39f409f351
1 changed files with 6 additions and 3 deletions
|
@ -124,7 +124,11 @@ public class StoredBlock {
|
|||
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 class StoredBlock {
|
|||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
Loading…
Add table
Reference in a new issue