Constructor
new LevelBatch(db)
Create LevelBatch
Parameters:
Name | Type | Description |
---|---|---|
db |
bdb.DB |
- Source:
Methods
clear() → {this}
Clear the batch.
- Source:
Returns:
- Type
- this
(async) commit() → {Promise}
Write change to the store.
- Source:
Returns:
- Type
- Promise
pruneBlock(hash) → {this}
Prune block data from the batch.
Parameters:
Name | Type | Description |
---|---|---|
hash |
Buffer |
- Source:
Returns:
- Type
- this
pruneMerkle(hash) → {this}
Remove merkle block data from the batch.
Parameters:
Name | Type | Description |
---|---|---|
hash |
Buffer |
- Source:
Returns:
- Type
- this
pruneUndo(hash) → {this}
Remove undo data from the batch.
Parameters:
Name | Type | Description |
---|---|---|
hash |
Buffer |
- Source:
Returns:
- Type
- this
writeBlock(hash, data) → {this}
Write block data to the batch.
Parameters:
Name | Type | Description |
---|---|---|
hash |
Buffer | |
data |
Buffer |
- Source:
Returns:
- Type
- this
writeMerkle(hash, data) → {this}
Write merkle block data to the batch.
Parameters:
Name | Type | Description |
---|---|---|
hash |
Buffer | |
data |
Buffer |
- Source:
Returns:
- Type
- this
writeUndo(hash, data) → {this}
Write undo coin data to the batch.
Parameters:
Name | Type | Description |
---|---|---|
hash |
Buffer | |
data |
Buffer |
- Source:
Returns:
- Type
- this