Versions in this module Expand all Collapse all v0 v0.7.2 Dec 13, 2021 Changes in this version + const AccountMissing + const ActiveReconciliation + const BacklogFull + const BlockGone + const HeadBehind + const InactiveReconciliation + const TipFailure + var ErrBlockExistsFailed = errors.New("unable to check if block exists") + var ErrBlockGone = errors.New("block gone") + var ErrGetComputedBalanceFailed = errors.New("unable to get computed balance") + var ErrGetCurrentBlockFailed = errors.New("unable to get current block for reconciliation") + var ErrHeadBlockBehindLive = errors.New("head block behind") + var ErrLiveBalanceLookupFailed = errors.New("unable to lookup live balance") + func ContainsAccountCurrency(m map[string]struct{}, change *types.AccountCurrency) bool + func Err(err error) bool + type Handler interface + ReconciliationExempt func(ctx context.Context, reconciliationType string, ...) error + ReconciliationFailed func(ctx context.Context, reconciliationType string, ...) error + ReconciliationSkipped func(ctx context.Context, reconciliationType string, ...) error + ReconciliationSucceeded func(ctx context.Context, reconciliationType string, ...) error + type Helper interface + CanonicalBlock func(ctx context.Context, dbTx database.Transaction, block *types.BlockIdentifier) (bool, error) + ComputedBalance func(ctx context.Context, dbTx database.Transaction, ...) (*types.Amount, error) + CurrentBlock func(ctx context.Context, dbTx database.Transaction) (*types.BlockIdentifier, error) + DatabaseTransaction func(ctx context.Context) database.Transaction + ForceInactiveReconciliation func(ctx context.Context, account *types.AccountIdentifier, ...) bool + IndexAtTip func(ctx context.Context, index int64) (bool, error) + LiveBalance func(ctx context.Context, account *types.AccountIdentifier, ...) (*types.Amount, *types.BlockIdentifier, error) + PruneBalances func(ctx context.Context, account *types.AccountIdentifier, ...) error + type InactiveEntry struct + Entry *types.AccountCurrency + LastCheck *types.BlockIdentifier + type Option func(r *Reconciler) + func WithActiveConcurrency(concurrency int) Option + func WithBacklogSize(size int) Option + func WithBalancePruning() Option + func WithDebugLogging() Option + func WithInactiveConcurrency(concurrency int) Option + func WithInactiveFrequency(blocks int64) Option + func WithInterestingAccounts(interesting []*types.AccountCurrency) Option + func WithLookupBalanceByBlock() Option + func WithSeenAccounts(seen []*types.AccountCurrency) Option + type Reconciler struct + ActiveConcurrency int + InactiveConcurrency int + func New(helper Helper, handler Handler, p *parser.Parser, options ...Option) *Reconciler + func (r *Reconciler) CompareBalance(ctx context.Context, account *types.AccountIdentifier, ...) (string, string, int64, error) + func (r *Reconciler) LastIndexReconciled() int64 + func (r *Reconciler) QueueChanges(ctx context.Context, block *types.BlockIdentifier, ...) error + func (r *Reconciler) QueueSize() int + func (r *Reconciler) Reconcile(ctx context.Context) error