mempool-dat: Index | Files

package lib

import ""

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 for some usage examples.


Package Files

reader.go types.go

type FileHeader Uses

type FileHeader struct {
    // contains filtered or unexported fields

FileHeader represents the mempool file header

func (FileHeader) GetTxCount Uses

func (header FileHeader) GetTxCount() int64

GetTxCount returns the number of transactions in the corresponding file

func (FileHeader) GetVersion Uses

func (header FileHeader) GetVersion() int64

GetVersion returns the mempool file version

func (FileHeader) String Uses

func (header FileHeader) String() string

returns the version and the number of transactions in the file

type Mempool Uses

type Mempool struct {
    // contains filtered or unexported fields

Mempool represents a parsed mempool.dat file

func ReadMempoolFromPath Uses

func ReadMempoolFromPath(path string) (mem Mempool, err error)

ReadMempoolFromPath reads a mempool file from a given path and returns a Mempool type

func (Mempool) GetFileHeader Uses

func (mempool Mempool) GetFileHeader() FileHeader

GetFileHeader returns a the mempool file header

func (Mempool) GetMapDeltas Uses

func (mempool Mempool) GetMapDeltas() []byte

GetMapDeltas returns a byte slice of not parsed mapDelta entries

func (Mempool) GetMempoolEntries Uses

func (mempool Mempool) GetMempoolEntries() []MempoolEntry

GetMempoolEntries returns a slice with mempool entries

type MempoolEntry Uses

type MempoolEntry struct {
    // contains filtered or unexported fields

MempoolEntry represents a mempool entry

func (MempoolEntry) GetFeeDelta Uses

func (entry MempoolEntry) GetFeeDelta() int64

GetFeeDelta returns feeDelta of the entry

func (MempoolEntry) GetFirstSeen Uses

func (entry MempoolEntry) GetFirstSeen() int64

GetFirstSeen returns the firstSeen time of the entry as timestamp

func (MempoolEntry) Info Uses

func (entry MempoolEntry) Info() string

Info returns a string with information for a given MempoolEntry

func (MempoolEntry) String Uses

func (entry MempoolEntry) String() string

returns the transaction hash of the entry

Package lib imports 7 packages (graph). Updated 2019-05-16. Refresh now. Tools for package owners.