Class: AbstractBatch

(abstract) blockstore.AbstractBatch()

This class is just interface for file and level batches.

Constructor

(abstract) new AbstractBatch()

Create AbstractBatch.

Source:

Methods

clear() → {Batch}

Clear the batch.

Source:
Returns:
Type
Batch

pruneBlock(hash) → {Batch}

Prune block data from the batch.

Parameters:
Name Type Description
hash Buffer
Source:
Returns:
Type
Batch

pruneMerkle(hash) → {Batch}

Remove merkle block data from the batch.

Parameters:
Name Type Description
hash Buffer
Source:
Returns:
Type
Batch

pruneUndo(hash) → {Batch}

Remove undo data from the batch.

Parameters:
Name Type Description
hash Buffer
Source:
Returns:
Type
Batch

write() → {Promise}

Write change to the store.

Source:
Returns:
Type
Promise

writeBlock(hash, data) → {Batch}

Write block data to the batch.

Parameters:
Name Type Description
hash Buffer
data Buffer
Source:
Returns:
Type
Batch

writeMerkle() → {Batch}

Write merkle block data to the batch.

Properties:
Name Type Description
hash Buffer
data Buffer
Source:
Returns:
Type
Batch

writeUndo(hash, data) → {Batch}

Write undo coin data to the batch.

Parameters:
Name Type Description
hash Buffer
data Buffer
Source:
Returns:
Type
Batch