Skip to content

Commit

Permalink
Merge pull request #3377 from Juliusan/bugfixes
Browse files Browse the repository at this point in the history
BugFix: statemanager pipes are not closed avoiding errors in tests
  • Loading branch information
jorgemmsilva authored Apr 23, 2024
2 parents 52f25a5 + 24e0c1d commit 15085ca
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/chain/statemanager/state_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,14 @@ func New(
})

result.cleanupFun = func() {
result.inputPipe.Close()
result.messagePipe.Close()
result.nodePubKeysPipe.Close()
result.preliminaryBlockPipe.Close()
// The following lines cause this error:
// 2024-03-20T11:53:22.932Z DEBUG TestNodeBasic/N=1,F=0,Reliable=true.8188.N#0.C-0x431e910b.LI-5 cons/cons.go:454 uponDSSIndexProposalReady
// panic: send on closed channel
// TODO: Find a way to close the channels avoiding the error.
// result.inputPipe.Close()
// result.messagePipe.Close()
// result.nodePubKeysPipe.Close()
// result.preliminaryBlockPipe.Close()
util.ExecuteIfNotNil(unhook)
}

Expand Down

0 comments on commit 15085ca

Please sign in to comment.