Methods
clear() → {Batch}
Clear the batch.
- Source:
Returns:
- Type
- Batch
(async) commit() → {Promise}
Commit both.
- Source:
Returns:
- Type
- Promise
(async) commitPrunes() → {Promise}
Commit only prunes.
- Source:
Returns:
- Type
- Promise
(async) commitWrites() → {Promise}
Commit only writes.
- Source:
Returns:
- Type
- Promise
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
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