mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
4b12f40a48
MaxMessagePayload and MaxSliceLength are duplicate variables. This commit deletes MaxMessagePayload and keeps MaxSliceLength.
20 lines
568 B
Go
20 lines
568 B
Go
package buffer
|
|
|
|
import (
|
|
"github.com/lightningnetwork/lnd/lnwire"
|
|
)
|
|
|
|
// WriteSize represents the size of the maximum plaintext message than can be
|
|
// sent using brontide. The buffer does not include extra space for the MAC, as
|
|
// that is applied by the Noise protocol after encrypting the plaintext.
|
|
const WriteSize = lnwire.MaxSliceLength
|
|
|
|
// Write is static byte array occupying to maximum-allowed plaintext-message
|
|
// size.
|
|
type Write [WriteSize]byte
|
|
|
|
// Recycle zeroes the Write, making it fresh for another use.
|
|
func (b *Write) Recycle() {
|
|
RecycleSlice(b[:])
|
|
}
|