lnd/peer
Olaoluwa Osuntokun 3e1558b616
peer: re-use buf from bufpool when decoding messages
In this commit, which builds on top of the prior commit, rather than
using the returned buffer outside of the closure (which means it'll be
copied), we instead use it within the `Submit` closure instead. With the
recent changes to the `brontide` package, we won't allocate any new
buffer when we decrypt, as a result, the `rawMsg` byte slice actually
just slices into the passed `buf` slice (obtained from the pool)`.

With this change, we ensure that the buffer pool can release the slice
back to the pool and eliminate any extra allocations along the way.
2021-08-27 16:57:15 -07:00
..
brontide_test.go peer: ensure consistent local+global feature bits when downgrading 2020-12-17 17:04:15 -08:00
brontide.go peer: re-use buf from bufpool when decoding messages 2021-08-27 16:57:15 -07:00
interfaces.go htlcswitch+peer: CreateAndAddLink in switch, add messageSwitch to peer 2021-08-10 17:15:52 -04:00
log.go multi: remove peer.go, change all references to point to peer pkg 2020-07-06 19:16:07 -04:00
test_utils.go htlcswitch+peer: CreateAndAddLink in switch, add messageSwitch to peer 2021-08-10 17:15:52 -04:00