Constructor
new LevelBatch(db)
Create LevelBatch
Parameters:
Name | Type | Description |
---|---|---|
db |
DB |
- Source:
Methods
clear() → {Batch}
Clear the batch.
- Source:
Returns:
- Type
- Batch
(async) commit() → {Promise}
Write change to the store.
- 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