Documentation ¶
Index ¶
- func AllocateFileRange(file *os.File, offset uint32, length uint32)
- func CalculateCurrentUsage() uint64
- func CheckDiskSpace(nAdditionalBytes uint32) bool
- func CleanupBlockRevFiles() (err error)
- func FindBlockPos(pos *block.DiskBlockPos, nAddSize uint32, nHeight int32, nTime uint64, ...) bool
- func FindFilesToPrune(setFilesToPrune *set.Set, nPruneAfterHeight uint64)
- func FindFilesToPruneManual(setFilesToPrune *set.Set, manualPruneHeight int)
- func FindUndoPos(nFile int32, undoPos *block.DiskBlockPos, nAddSize int) error
- func FlushBlockFile(fFinalize bool)
- func FlushStateToDisk(mode FlushStateMode, nManualPruneHeight int) error
- func GetBlkFiles() (blkFiles []string, err error)
- func GetBlockPosFilename(pos block.DiskBlockPos, prefix string) string
- func GetBlockPosParentFilename() string
- func GetPruneState() *persist.PruneState
- func OpenBlockFile(pos *block.DiskBlockPos, fReadOnly bool) *os.File
- func OpenDiskFile(pos block.DiskBlockPos, prefix string, fReadOnly bool) *os.File
- func OpenUndoFile(pos block.DiskBlockPos, fReadOnly bool) *os.File
- func PruneOneBlockFile(fileNumber int32)
- func ReadBlockFromDisk(pindex *blockindex.BlockIndex, param *model.BitcoinParams) (*block.Block, bool)
- func ReadBlockFromDiskByPos(pos block.DiskBlockPos, param *model.BitcoinParams) (blk *block.Block, err error)
- func UndoReadFromDisk(pos *block.DiskBlockPos, hashblock util.Hash) (*undo.BlockUndo, bool)
- func UndoWriteToDisk(bu *undo.BlockUndo, pos *block.DiskBlockPos, hashBlock util.Hash, ...) error
- func UnlinkPrunedFiles(setFilesToPrune *set.Set)
- func WriteBlockToDisk(block *block.Block, pos *block.DiskBlockPos) bool
- type FlushStateMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateCurrentUsage ¶
func CalculateCurrentUsage() uint64
CalculateCurrentUsage Calculate the amount of disk space the block & undo files currently use
func CheckDiskSpace ¶
func CleanupBlockRevFiles ¶ added in v0.0.3
func CleanupBlockRevFiles() (err error)
func FindBlockPos ¶
func FindFilesToPrune ¶
func FindFilesToPrune(setFilesToPrune *set.Set, nPruneAfterHeight uint64)
FindFilesToPrune calculate the block/rev files that should be deleted to remain under target
func FindFilesToPruneManual ¶
func FindFilesToPruneManual(setFilesToPrune *set.Set, manualPruneHeight int)
func FindUndoPos ¶
func FindUndoPos(nFile int32, undoPos *block.DiskBlockPos, nAddSize int) error
func FlushBlockFile ¶
func FlushBlockFile(fFinalize bool)
func FlushStateToDisk ¶
func FlushStateToDisk(mode FlushStateMode, nManualPruneHeight int) error
func GetBlkFiles ¶ added in v0.0.3
func GetBlockPosFilename ¶
func GetBlockPosFilename(pos block.DiskBlockPos, prefix string) string
func GetBlockPosParentFilename ¶
func GetBlockPosParentFilename() string
func GetPruneState ¶
func GetPruneState() *persist.PruneState
func OpenBlockFile ¶
func OpenBlockFile(pos *block.DiskBlockPos, fReadOnly bool) *os.File
func OpenDiskFile ¶
func OpenUndoFile ¶
func OpenUndoFile(pos block.DiskBlockPos, fReadOnly bool) *os.File
func PruneOneBlockFile ¶
func PruneOneBlockFile(fileNumber int32)
PruneOneBlockFile prune a block file (modify associated database entries)
func ReadBlockFromDisk ¶
func ReadBlockFromDisk(pindex *blockindex.BlockIndex, param *model.BitcoinParams) (*block.Block, bool)
func ReadBlockFromDiskByPos ¶ added in v0.0.3
func ReadBlockFromDiskByPos(pos block.DiskBlockPos, param *model.BitcoinParams) (blk *block.Block, err error)
func UndoReadFromDisk ¶
func UndoWriteToDisk ¶
func UndoWriteToDisk(bu *undo.BlockUndo, pos *block.DiskBlockPos, hashBlock util.Hash, messageStart wire.BitcoinNet) error
func UnlinkPrunedFiles ¶
func UnlinkPrunedFiles(setFilesToPrune *set.Set)
func WriteBlockToDisk ¶
func WriteBlockToDisk(block *block.Block, pos *block.DiskBlockPos) bool
Types ¶
type FlushStateMode ¶
type FlushStateMode int
const ( FlushStateNone FlushStateMode = iota FlushStateIfNeeded FlushStatePeriodic FlushStateAlways )
Click to show internal directories.
Click to hide internal directories.