Skip to content

Commit

Permalink
fix(sync): removing height condition for applying cached blocks from …
Browse files Browse the repository at this point in the history
…p2p (#787)

Co-authored-by: github-actions <[email protected]>
  • Loading branch information
2 people authored and omritoptix committed May 3, 2024
1 parent fe4e7e7 commit 868e341
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))



Expand Down
8 changes: 3 additions & 5 deletions block/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 868e341

Please sign in to comment.