Skip to content

Commit

Permalink
Fix: Issue when using custom key templates after scanning utxosets
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier committed Dec 27, 2024
1 parent 9d79682 commit 530a380
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NBXplorer/ScanUTXOSetService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ private async Task UpdateRepository(RPCClient client, DerivationSchemeTrackedSou
{
foreach (var keyInfo in o.KeyPathInformations)
{
var index = keyInfo.KeyPath.Indexes.Last();
var index = keyInfo.Index.Value;
var highest = progressObj.HighestKeyIndexFound[keyInfo.Feature];
if (highest == null || index > highest.Value)
{
Expand All @@ -272,7 +272,7 @@ await repo.SaveKeyInformations(scannedItems.
var highest = progressObj.HighestKeyIndexFound[p.Feature];
if (highest == null)
return false;
return p.KeyPath.Indexes.Last() <= highest.Value;
return p.Index.Value <= highest.Value;
}).ToArray());
await repo.UpdateAddressPool(trackedSource, progressObj.HighestKeyIndexFound);
DateTimeOffset now = DateTimeOffset.UtcNow;
Expand Down

0 comments on commit 530a380

Please sign in to comment.