In this commit, we add a new package level mutex. Each time we decode a new set of chan IDs w/ zlib, we also grab this mutex. The purpose here is to ensure that we only EVER allocate the maxZlibBufSize globally across all peers. Otherwise, it may be possible for us to allocate up to 64 MB for _each_ peer, exposing an easy OOM attack vector.
lnwire
The lnwire package implements the Lightning Network wire protocol.
This package has intentionally been designed so it can be used as a standalone package for any projects needing to interface with lightning peers at the wire protocol level.
Installation and Updating
$ go get -u github.com/lightningnetwork/lnd/lnwire