From 868e341ef9883278fb289d1208f9c38f1c9689d6 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Fri, 3 May 2024 18:16:11 +0200 Subject: [PATCH] fix(sync): removing height condition for applying cached blocks from p2p (#787) Co-authored-by: github-actions --- CHANGELOG.md | 6 ++++++ block/manager.go | 8 +++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e95b48e98..06a703a7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,12 @@ * **rpc:** nil panic in rpc/json/handler.go WriteError ([#750](https://github.com/dymensionxyz/dymint/issues/750)) ([e09709b](https://github.com/dymensionxyz/dymint/commit/e09709b428a33da002defb9f13178fa19b81a69b)) * **settlement:** remove state index from proto ([#777](https://github.com/dymensionxyz/dymint/issues/777)) ([767b8fd](https://github.com/dymensionxyz/dymint/commit/767b8fdb490c37deee43ac023688410bbb98ccb0)) * **sync:** make sure we use a latest state index as a start point ([#760](https://github.com/dymensionxyz/dymint/issues/760)) ([43e2d96](https://github.com/dymensionxyz/dymint/commit/43e2d965f2b505751f8e5260549e909c976141ee)) +* **tests:** fix unit tests, mocks, cleanup/dry hub queries ([#782](https://github.com/dymensionxyz/dymint/issues/782)) ([c276aea](https://github.com/dymensionxyz/dymint/commit/c276aea12c9cd37f62fcf9d684c4efe901a510bf)) + + +### Features + +* **produce:** limiting block size by maxBatchSize ([#784](https://github.com/dymensionxyz/dymint/issues/784)) ([f90042c](https://github.com/dymensionxyz/dymint/commit/f90042cd61fc6b60093478cd65491f8aa1106457)) diff --git a/block/manager.go b/block/manager.go index 815f135eb..5f59f2ddd 100644 --- a/block/manager.go +++ b/block/manager.go @@ -255,11 +255,9 @@ func (m *Manager) onNewGossipedBlock(event pubsub.Message) { m.logger.Debug("caching block", "block height", block.Header.Height, "store height", m.Store.Height()) } m.retrieverMutex.Unlock() // have to give this up as it's locked again in attempt apply, and we're not re-entrant - if block.Header.Height == nextHeight { - err := m.attemptApplyCachedBlocks() - if err != nil { - m.logger.Error("applying cached blocks", "err", err) - } + err := m.attemptApplyCachedBlocks() + if err != nil { + m.logger.Error("applying cached blocks", "err", err) } }