Documentation ¶
Index ¶
- func DisableLog()
- func UseLogger(logger slog.Logger)
- type DcrwalletCSDriver
- func (d *DcrwalletCSDriver) ChainEvents(ctx context.Context) <-chan chainscan.ChainEvent
- func (d *DcrwalletCSDriver) CurrentTip(ctx context.Context) (*chainhash.Hash, int32, error)
- func (d *DcrwalletCSDriver) GetBlock(ctx context.Context, bh *chainhash.Hash) (*wire.MsgBlock, error)
- func (d *DcrwalletCSDriver) GetCFilter(ctx context.Context, height int32) (*chainhash.Hash, [16]byte, *gcs.FilterV2, error)
- func (d *DcrwalletCSDriver) Run(ctx context.Context) error
- type RemoteWalletCSDriver
- func (d *RemoteWalletCSDriver) ChainEvents(ctx context.Context) <-chan chainscan.ChainEvent
- func (d *RemoteWalletCSDriver) CurrentTip(ctx context.Context) (*chainhash.Hash, int32, error)
- func (d *RemoteWalletCSDriver) GetBlock(ctx context.Context, bh *chainhash.Hash) (*wire.MsgBlock, error)
- func (d *RemoteWalletCSDriver) GetCFilter(ctx context.Context, height int32) (*chainhash.Hash, [16]byte, *gcs.FilterV2, error)
- func (d *RemoteWalletCSDriver) Run(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.
Types ¶
type DcrwalletCSDriver ¶
type DcrwalletCSDriver struct {
// contains filtered or unexported fields
}
DcrwalletCSDriver...
NOTE: Using an individual driver instance for more than either a single historical or tip watcher scanner leads to undefined behavior.
func NewDcrwalletCSDriver ¶
func NewDcrwalletCSDriver(w *wallet.Wallet, bCache *blockcache.BlockCache) *DcrwalletCSDriver
func (*DcrwalletCSDriver) ChainEvents ¶
func (d *DcrwalletCSDriver) ChainEvents(ctx context.Context) <-chan chainscan.ChainEvent
func (*DcrwalletCSDriver) CurrentTip ¶
func (*DcrwalletCSDriver) GetBlock ¶
func (d *DcrwalletCSDriver) GetBlock(ctx context.Context, bh *chainhash.Hash) (*wire.MsgBlock, error)
GetBlock returns the given block for the given blockhash. Note that for wallets running in SPV mode this blocks until the wallet is connected to a peer and it correctly returns a full block.
func (*DcrwalletCSDriver) GetCFilter ¶
func (d *DcrwalletCSDriver) GetCFilter(ctx context.Context, height int32) (*chainhash.Hash, [16]byte, *gcs.FilterV2, error)
GetCFilter is part of the chainscan.HistoricalChainSource interface.
NOTE: The returned chainhash pointer is not safe for storage as it belongs to a cache entry. This is fine for use on a chainscan.Historical scanner since it never stores or leaks the pointer itself.
type RemoteWalletCSDriver ¶
type RemoteWalletCSDriver struct {
// contains filtered or unexported fields
}
func NewRemoteWalletCSDriver ¶
func NewRemoteWalletCSDriver(wsvc walletrpc.WalletServiceClient, nsvc walletrpc.NetworkServiceClient, bcache *blockcache.BlockCache) *RemoteWalletCSDriver
func (*RemoteWalletCSDriver) ChainEvents ¶
func (d *RemoteWalletCSDriver) ChainEvents(ctx context.Context) <-chan chainscan.ChainEvent
func (*RemoteWalletCSDriver) CurrentTip ¶
func (*RemoteWalletCSDriver) GetCFilter ¶
func (d *RemoteWalletCSDriver) GetCFilter(ctx context.Context, height int32) (*chainhash.Hash, [16]byte, *gcs.FilterV2, error)
GetCFilter is part of the chainscan.HistoricalChainSource interface.
NOTE: The returned chainhash pointer is not safe for storage as it belongs to a cache entry. This is fine for use on a chainscan.Historical scanner since it never stores or leaks the pointer itself.