mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-23 22:56:52 +01:00
Only update wallet's sync height if we don't have a match in processCompactFilter() (#4169)
This commit is contained in:
parent
ec384a8b39
commit
d63e845de4
1 changed files with 12 additions and 3 deletions
|
@ -207,9 +207,18 @@ abstract class Wallet
|
|||
_ <- {
|
||||
heightOpt match {
|
||||
case Some(height) =>
|
||||
stateDescriptorDAO
|
||||
.updateSyncHeight(hash, height)
|
||||
.map(_ => ())
|
||||
if (blockHashToDownload.isEmpty) {
|
||||
//if we don't have any block hashes
|
||||
//we need to update the wallet's sync height
|
||||
stateDescriptorDAO
|
||||
.updateSyncHeight(hash, height)
|
||||
.map(_ => ())
|
||||
} else {
|
||||
//if we do have a block hash that we matched
|
||||
//we need to let wallet.processBlock()
|
||||
//update the wallet's sync height
|
||||
Future.unit
|
||||
}
|
||||
case None =>
|
||||
Future.unit
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue