ledger/gossip: commented out code to reduce garbage collection contention; causes regressions
@@ -25,15 +25,18 @@ func gossip(ledger *Ledger) func(ctx context.Context) error {
var Result chan<- Transaction
var Error chan<- error
- defer func() {
- if Result != nil {
- close(Result)
- }
-
- if Error != nil {
- close(Error)
- }
- }()
+ // TODO(kenta): the code below should reduce contention on the garbage collector, though for some
+ // reason it causes some nodes to never advance to the next consensus round when running a benchmark
+ //
+ //defer func() {
+ // if Result != nil {
+ // close(Result)
+ // }
+ //
+ // if Error != nil {
+ // close(Error)
+ // }
+ //}()
select {
case <-ctx.Done():
