Skip to content

Commit 530a380

Browse files
committed
Fix: Issue when using custom key templates after scanning utxosets
1 parent 9d79682 commit 530a380

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

NBXplorer/ScanUTXOSetService.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ private async Task UpdateRepository(RPCClient client, DerivationSchemeTrackedSou
255255
{
256256
foreach (var keyInfo in o.KeyPathInformations)
257257
{
258-
var index = keyInfo.KeyPath.Indexes.Last();
258+
var index = keyInfo.Index.Value;
259259
var highest = progressObj.HighestKeyIndexFound[keyInfo.Feature];
260260
if (highest == null || index > highest.Value)
261261
{
@@ -272,7 +272,7 @@ await repo.SaveKeyInformations(scannedItems.
272272
var highest = progressObj.HighestKeyIndexFound[p.Feature];
273273
if (highest == null)
274274
return false;
275-
return p.KeyPath.Indexes.Last() <= highest.Value;
275+
return p.Index.Value <= highest.Value;
276276
}).ToArray());
277277
await repo.UpdateAddressPool(trackedSource, progressObj.HighestKeyIndexFound);
278278
DateTimeOffset now = DateTimeOffset.UtcNow;

0 commit comments

Comments
 (0)