Documentation ¶
Index ¶
- Constants
- Variables
- type BlockDB
- func (bDB *BlockDB) AfterCommit()
- func (bDB *BlockDB) AfterRecover()
- func (bDB *BlockDB) BeforeRecover(redoLog []byte)
- func (bDB *BlockDB) CancelPrepare()
- func (bDB *BlockDB) Close() error
- func (bDB *BlockDB) Commit() error
- func (bDB *BlockDB) FileSize() int64
- func (bDB *BlockDB) GetAccountBlock(location *chain_file_manager.Location) (*ledger.AccountBlock, error)
- func (bDB *BlockDB) GetNextLocation(location *chain_file_manager.Location) (*chain_file_manager.Location, error)
- func (bDB *BlockDB) GetSnapshotBlock(location *chain_file_manager.Location) (*ledger.SnapshotBlock, error)
- func (bDB *BlockDB) GetSnapshotHeader(location *chain_file_manager.Location) (*ledger.SnapshotBlock, error)
- func (bDB *BlockDB) GetStatus() []interfaces.DBStatus
- func (bDB *BlockDB) Id() types.Hash
- func (bDB *BlockDB) PatchRedoLog(redoLog []byte) error
- func (bDB *BlockDB) Prepare()
- func (bDB *BlockDB) PrepareRollback(location *chain_file_manager.Location) ([]*ledger.SnapshotChunk, error)
- func (bDB *BlockDB) Read(location *chain_file_manager.Location) ([]byte, error)
- func (bDB *BlockDB) ReadRange(startLocation *chain_file_manager.Location, ...) ([]*ledger.SnapshotChunk, error)
- func (bDB *BlockDB) ReadRaw(startLocation *chain_file_manager.Location, buf []byte) (*chain_file_manager.Location, int, error)
- func (bDB *BlockDB) RedoLog() ([]byte, error)
- func (bDB *BlockDB) Rollback(location *chain_file_manager.Location) error
- func (bDB *BlockDB) SetLog(h log15.Handler)
- func (bDB *BlockDB) Write(ss *ledger.SnapshotChunk) ([]*chain_file_manager.Location, *chain_file_manager.Location, error)
- type BufWriter
Constants ¶
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BlockDB ¶
type BlockDB struct {
// contains filtered or unexported fields
}
func (*BlockDB) CancelPrepare ¶
func (bDB *BlockDB) CancelPrepare()
Assume locking writing (lock the insertion and deletion of account block and snapshot block) nextFlushStartLocation is the start location of the next flush. bDB.flushStartLocation is
func (*BlockDB) GetAccountBlock ¶
func (bDB *BlockDB) GetAccountBlock(location *chain_file_manager.Location) (*ledger.AccountBlock, error)
func (*BlockDB) GetNextLocation ¶
func (*BlockDB) GetSnapshotBlock ¶
func (bDB *BlockDB) GetSnapshotBlock(location *chain_file_manager.Location) (*ledger.SnapshotBlock, error)
func (*BlockDB) GetSnapshotHeader ¶
func (bDB *BlockDB) GetSnapshotHeader(location *chain_file_manager.Location) (*ledger.SnapshotBlock, error)
TODO optimize
func (*BlockDB) GetStatus ¶
func (bDB *BlockDB) GetStatus() []interfaces.DBStatus
func (*BlockDB) PrepareRollback ¶
func (bDB *BlockDB) PrepareRollback(location *chain_file_manager.Location) ([]*ledger.SnapshotChunk, error)
func (*BlockDB) Read ¶
func (*BlockDB) ReadRange ¶
func (bDB *BlockDB) ReadRange(startLocation *chain_file_manager.Location, endLocation *chain_file_manager.Location) ([]*ledger.SnapshotChunk, error)
func (*BlockDB) ReadRaw ¶
func (*BlockDB) Rollback ¶
func (*BlockDB) Write ¶
func (bDB *BlockDB) Write(ss *ledger.SnapshotChunk) ([]*chain_file_manager.Location, *chain_file_manager.Location, error)
type BufWriter ¶
Click to show internal directories.
Click to hide internal directories.