dymensionxyz / dymint

Sequencing Engine for Dymension RollApps
Other
98 stars 68 forks source link

Avoid local pub sub subscription cancellations #848

Open danwt opened 6 months ago

danwt commented 6 months ago

When using buffered channels the subscription gets cancelled if the channel gets full

We need to decide on a solution

See https://github.com/dymensionxyz/dymint/pull/773 for discussion and context

cc @omritoptix

srene commented 6 months ago

just mention that unbuffered channels are still used here https://github.com/dymensionxyz/dymint/blob/94267ae551de46bda60898c23f5092125e60aca6/utils/event/funcs.go#L24, mainly for block received events from p2p. although IMO is better to use unbuffered here to avoid the risk of canceling and therefore stop syncing.