Documentation ¶
Overview ¶
Package lib provides mempool file primitives and functionality to load a mempool.dat file.
You'd want to be calling ReadMempoolFromPath( ) to read a mempool.dat file. See https://github.com/0xB10C/mempool-dat for some usage examples.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileHeader ¶
type FileHeader struct {
// contains filtered or unexported fields
}
FileHeader represents the mempool file header
func (FileHeader) GetTxCount ¶
func (header FileHeader) GetTxCount() int64
GetTxCount returns the number of transactions in the corresponding file
func (FileHeader) GetVersion ¶
func (header FileHeader) GetVersion() int64
GetVersion returns the mempool file version
func (FileHeader) String ¶
func (header FileHeader) String() string
returns the version and the number of transactions in the file
type Mempool ¶
type Mempool struct {
// contains filtered or unexported fields
}
Mempool represents a parsed mempool.dat file
func ReadMempoolFromPath ¶
ReadMempoolFromPath reads a mempool file from a given path and returns a Mempool type
func (Mempool) GetFileHeader ¶
func (mempool Mempool) GetFileHeader() FileHeader
GetFileHeader returns a the mempool file header
func (Mempool) GetMapDeltas ¶
GetMapDeltas returns a byte slice of not parsed mapDelta entries
func (Mempool) GetMempoolEntries ¶
func (mempool Mempool) GetMempoolEntries() []MempoolEntry
GetMempoolEntries returns a slice with mempool entries
type MempoolEntry ¶
type MempoolEntry struct {
// contains filtered or unexported fields
}
MempoolEntry represents a mempool entry
func (MempoolEntry) GetFeeDelta ¶
func (entry MempoolEntry) GetFeeDelta() int64
GetFeeDelta returns feeDelta of the entry
func (MempoolEntry) GetFirstSeen ¶
func (entry MempoolEntry) GetFirstSeen() int64
GetFirstSeen returns the firstSeen time of the entry as timestamp
func (MempoolEntry) Info ¶
func (entry MempoolEntry) Info() string
Info returns a string with information for a given MempoolEntry
func (MempoolEntry) String ¶
func (entry MempoolEntry) String() string
returns the transaction hash of the entry