mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 13:16:44 +00:00
cormorant: default to existing descriptor timestamp when extending range
This commit is contained in:
parent
6072f6d31a
commit
675b7ed4f8
1 changed files with 1 additions and 2 deletions
|
@ -330,8 +330,7 @@ public class BitcoindClient {
|
|||
ScanDate scanDate = entry.getValue();
|
||||
ScanDate importedScanDate = importedDescriptors.get(entry.getKey());
|
||||
if(scanDate.range != null && importedScanDate != null && importedScanDate.range != null && scanDate.range > importedScanDate.range) {
|
||||
Date rescanSince = scanDate.rescanSince != null && (importedScanDate.rescanSince == null || scanDate.rescanSince.before(importedScanDate.rescanSince)) ? scanDate.rescanSince : importedScanDate.rescanSince;
|
||||
importingDescriptors.put(entry.getKey(), new ScanDate(rescanSince, scanDate.range, false));
|
||||
importingDescriptors.put(entry.getKey(), new ScanDate(importedScanDate.rescanSince == null || scanDate.forceRescan ? scanDate.rescanSince : importedScanDate.rescanSince, scanDate.range, false));
|
||||
} else if(scanDate.forceRescan) {
|
||||
if(scanDate.rescanSince != null && (importedScanDate == null || importedScanDate.rescanSince == null || scanDate.rescanSince.before(importedScanDate.rescanSince))) {
|
||||
importingDescriptors.put(entry.getKey(), new ScanDate(scanDate.rescanSince, importedScanDate != null ? importedScanDate.range : scanDate.range, false));
|
||||
|
|
Loading…
Reference in a new issue