Documentation ¶
Index ¶
- Variables
- type Block
- type Blocks
- type Chain
- type Event
- type Monitor
- func (m *Monitor) Chain() *Chain
- func (m *Monitor) GetBlock(hash common.Hash) *Block
- func (m *Monitor) GetTransaction(hash common.Hash) *types.Transaction
- func (m *Monitor) IsRunning() bool
- func (m *Monitor) LatestBlock() *Block
- func (m *Monitor) Options() Options
- func (m *Monitor) Provider() *ethrpc.Provider
- func (m *Monitor) Start(ctx context.Context) error
- func (m *Monitor) Stop() error
- func (m *Monitor) Subscribe() Subscription
- type Options
- type Subscription
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnexpectedParentHash = fmt.Errorf("unexpected parent hash") ErrUnexpectedBlockNumber = fmt.Errorf("unexpected block number") )
Functions ¶
This section is empty.
Types ¶
type Blocks ¶
type Blocks []*Block
func (Blocks) EventExists ¶ added in v1.3.0
func (Blocks) LatestBlock ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
func (*Chain) GetBlockByNumber ¶ added in v1.3.2
func (*Chain) GetTransaction ¶
func (c *Chain) GetTransaction(hash common.Hash) *types.Transaction
func (*Chain) PrintAllBlocks ¶
func (c *Chain) PrintAllBlocks()
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
func (*Monitor) GetTransaction ¶
func (m *Monitor) GetTransaction(hash common.Hash) *types.Transaction
GetBlock will search within the retained blocks for the txn hash
func (*Monitor) LatestBlock ¶
LatestBlock will return the head block of the retained chain
func (*Monitor) Subscribe ¶
func (m *Monitor) Subscribe() Subscription
type Subscription ¶
type Subscription interface { Blocks() <-chan Blocks Done() <-chan struct{} Unsubscribe() }
Click to show internal directories.
Click to hide internal directories.