Merge pull request #1463 from LukasKorba/1462-Syncing-is-broken
[#1462] Syncing is broken
This commit is contained in:
commit
0d2f7efd8d
|
@ -6,6 +6,11 @@ and this library adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
# Unreleased
|
# 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
|
# 2.1.11 - 2024-07-03
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
|
|
@ -44,7 +44,7 @@ extension UpdateChainTipAction: Action {
|
||||||
await downloader.stopDownload()
|
await downloader.stopDownload()
|
||||||
try await updateChainTip(context, time: now)
|
try await updateChainTip(context, time: now)
|
||||||
await context.update(state: .clearCache)
|
await context.update(state: .clearCache)
|
||||||
} else if await context.prevState == .enhance {
|
} else if await context.prevState == .txResubmission {
|
||||||
await context.update(state: .download)
|
await context.update(state: .download)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@ class DarksideSanityCheckTests: ZcashTestCase {
|
||||||
let expectedLastBlock = (height: BlockHeight(663200), hash: "2fc7b4682f5ba6ba6f86e170b40f0aa9302e1d3becb2a6ee0db611ff87835e4a")
|
let expectedLastBlock = (height: BlockHeight(663200), hash: "2fc7b4682f5ba6ba6f86e170b40f0aa9302e1d3becb2a6ee0db611ff87835e4a")
|
||||||
|
|
||||||
try coordinator.service.addTreeState(
|
try coordinator.service.addTreeState(
|
||||||
|
// swiftlint:disable line_length
|
||||||
try TreeState(jsonString:
|
try TreeState(jsonString:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,7 +91,7 @@ final class UpdateChainTipActionTests: ZcashTestCase {
|
||||||
|
|
||||||
do {
|
do {
|
||||||
let context = ActionContextMock.default()
|
let context = ActionContextMock.default()
|
||||||
context.prevState = .enhance
|
context.prevState = .txResubmission
|
||||||
context.underlyingLastChainTipUpdateTime = Date().timeIntervalSince1970
|
context.underlyingLastChainTipUpdateTime = Date().timeIntervalSince1970
|
||||||
context.updateLastChainTipUpdateTimeClosure = { _ in }
|
context.updateLastChainTipUpdateTimeClosure = { _ in }
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,7 @@ enum FakeChainBuilder {
|
||||||
|
|
||||||
|
|
||||||
try darksideWallet.addTreeState(
|
try darksideWallet.addTreeState(
|
||||||
|
// swiftlint:disable line_length
|
||||||
try TreeState(jsonString:
|
try TreeState(jsonString:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
|
@ -65,6 +66,7 @@ enum FakeChainBuilder {
|
||||||
)
|
)
|
||||||
|
|
||||||
try darksideWallet.addTreeState(
|
try darksideWallet.addTreeState(
|
||||||
|
// swiftlint:disable line_length
|
||||||
try TreeState(jsonString:
|
try TreeState(jsonString:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
|
@ -78,6 +80,7 @@ enum FakeChainBuilder {
|
||||||
)
|
)
|
||||||
|
|
||||||
try darksideWallet.addTreeState(
|
try darksideWallet.addTreeState(
|
||||||
|
// swiftlint:disable line_length
|
||||||
try TreeState(jsonString:
|
try TreeState(jsonString:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue