mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +01:00
3e1558b616
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. |
||
---|---|---|
.. | ||
brontide_test.go | ||
brontide.go | ||
interfaces.go | ||
log.go | ||
test_utils.go |