Documentation ¶
Index ¶
- type Event
- type EventCriteria
- type EventFilter
- type LogDB
- func (db *LogDB) Close() (err error)
- func (db *LogDB) FilterEvents(ctx context.Context, filter *EventFilter) ([]*Event, error)
- func (db *LogDB) FilterTransfers(ctx context.Context, filter *TransferFilter) ([]*Transfer, error)
- func (db *LogDB) HasBlockID(id thor.Bytes32) (bool, error)
- func (db *LogDB) NewWriter() *Writer
- func (db *LogDB) NewWriterSyncOff() *Writer
- func (db *LogDB) NewestBlockID() (thor.Bytes32, error)
- func (db *LogDB) Path() string
- type Options
- type Order
- type Range
- type Transfer
- type TransferCriteria
- type TransferFilter
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { BlockNumber uint32 Index uint32 BlockID thor.Bytes32 BlockTime uint64 TxID thor.Bytes32 TxOrigin thor.Address //contract caller ClauseIndex uint32 Address thor.Address // always a contract address Topics [5]*thor.Bytes32 Data []byte }
Event represents tx.Event that can be stored in db.
type EventCriteria ¶ added in v1.0.3
type EventFilter ¶
type EventFilter struct { CriteriaSet []*EventCriteria Range *Range Options *Options Order Order //default asc }
EventFilter filter
type LogDB ¶
type LogDB struct {
// contains filtered or unexported fields
}
func (*LogDB) FilterEvents ¶
func (*LogDB) FilterTransfers ¶
func (*LogDB) HasBlockID ¶ added in v1.1.0
HasBlockID query whether given block id related logs were written.
func (*LogDB) NewWriterSyncOff ¶ added in v1.7.0
NewWriterSyncOff creates a log writer which applied 'pragma synchronous = off'.
func (*LogDB) NewestBlockID ¶ added in v1.1.0
NewestBlockID query newest written block id.
type Transfer ¶
type Transfer struct { BlockNumber uint32 Index uint32 BlockID thor.Bytes32 BlockTime uint64 TxID thor.Bytes32 TxOrigin thor.Address ClauseIndex uint32 Sender thor.Address Recipient thor.Address Amount *big.Int }
Transfer represents tx.Transfer that can be stored in db.
type TransferCriteria ¶ added in v1.0.3
type TransferFilter ¶
type TransferFilter struct { CriteriaSet []*TransferCriteria Range *Range Options *Options Order Order //default asc }
type Writer ¶ added in v1.3.0
type Writer struct {
// contains filtered or unexported fields
}
Writer is the transactional log writer.
func (*Writer) Truncate ¶ added in v1.7.0
Truncate truncates the database by deleting logs after blockNum (included).
func (*Writer) UncommittedCount ¶ added in v1.7.0
UncommittedCount returns the count of uncommitted logs.
Click to show internal directories.
Click to hide internal directories.