Merge pull request #1463 from LukasKorba/1462-Syncing-is-broken

[#1462] Syncing is broken
This commit is contained in:
Lukas Korba 2024-07-04 08:46:13 +02:00 committed by GitHub
commit 0d2f7efd8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 11 additions and 2 deletions

View File

@ -6,6 +6,11 @@ and this library adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# Unreleased
## Fixed
### [#1462] Syncing is broken
The CompactBlockProcessor's state machine got stuck in some cases at the updateChainTip action.
# 2.1.11 - 2024-07-03
## Added

View File

@ -44,7 +44,7 @@ extension UpdateChainTipAction: Action {
await downloader.stopDownload()
try await updateChainTip(context, time: now)
await context.update(state: .clearCache)
} else if await context.prevState == .enhance {
} else if await context.prevState == .txResubmission {
await context.update(state: .download)
}

View File

@ -59,6 +59,7 @@ class DarksideSanityCheckTests: ZcashTestCase {
let expectedLastBlock = (height: BlockHeight(663200), hash: "2fc7b4682f5ba6ba6f86e170b40f0aa9302e1d3becb2a6ee0db611ff87835e4a")
try coordinator.service.addTreeState(
// swiftlint:disable line_length
try TreeState(jsonString:
"""
{

View File

@ -91,7 +91,7 @@ final class UpdateChainTipActionTests: ZcashTestCase {
do {
let context = ActionContextMock.default()
context.prevState = .enhance
context.prevState = .txResubmission
context.underlyingLastChainTipUpdateTime = Date().timeIntervalSince1970
context.updateLastChainTipUpdateTimeClosure = { _ in }

View File

@ -52,6 +52,7 @@ enum FakeChainBuilder {
try darksideWallet.addTreeState(
// swiftlint:disable line_length
try TreeState(jsonString:
"""
{
@ -65,6 +66,7 @@ enum FakeChainBuilder {
)
try darksideWallet.addTreeState(
// swiftlint:disable line_length
try TreeState(jsonString:
"""
{
@ -78,6 +80,7 @@ enum FakeChainBuilder {
)
try darksideWallet.addTreeState(
// swiftlint:disable line_length
try TreeState(jsonString:
"""
{