When an error occours (or the peer disconnect), we return from decorator
as an error is published to the chan.
There are though still 5 or 6 goroutines that want to write on that
channel and at least 3/4 of them will be hanging, leaving them stuck
publishing on the chan.
This though is probably not the cause of
https://github.com/status-im/infra-eth-cluster/issues/39
fills up the stack trace with hung go routines.
* Refactor of waku.doc.go
Moved out all code from docs.go, placed much of the seemingly misc code into much more closely related files, created a dedicated const file for housing all the package consts.
* Moved doc_test to message_test
* Refactored type collision and check on nil err
* message_test.go fmt
* Implemented whisper/doc.go refactor
* import order change to attempt to please the linter.
* Bug fix on whisper_test.go
I also spotted a load of redundant type casting and fixed some of them
* Add status-option code
This commits changes the behavior of waku introducing a new status-code,
`2`, that replaces the current single options codes.
* linting