예제 #1
0
        private async Task LoadWalletStateAsync(CancellationToken cancel)
        {
            KeyManager.AssertNetworkOrClearBlockState(Network);
            Height bestKeyManagerHeight = KeyManager.GetBestHeight();

            TransactionProcessor.Process(BitcoinStore.TransactionStore.ConfirmedStore.GetTransactions().TakeWhile(x => x.Height <= bestKeyManagerHeight));

            // Go through the filters and queue to download the matches.
            await BitcoinStore.IndexStore.ForeachFiltersAsync(async (filterModel) =>
            {
                if (filterModel.Filter != null)                 // Filter can be null if there is no bech32 tx.
                {
                    await ProcessFilterModelAsync(filterModel, cancel);
                }
            },
                                                              new Height(bestKeyManagerHeight.Value + 1));
        }