mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-04 12:54:07 +02:00
multi: Fix final hop payload size for AMP payments.
This commit is contained in:
@@ -19,6 +19,16 @@ type AMP struct {
|
||||
childIndex uint32
|
||||
}
|
||||
|
||||
// MaxAmpPayLoadSize is an AMP Record which when serialized to a tlv record uses
|
||||
// the maximum payload size. The `childIndex` is created randomly and is a
|
||||
// 4 byte `varint` type so we make sure we use an index which will be encoded in
|
||||
// 4 bytes.
|
||||
var MaxAmpPayLoadSize = AMP{
|
||||
rootShare: [32]byte{},
|
||||
setID: [32]byte{},
|
||||
childIndex: 0x80000000,
|
||||
}
|
||||
|
||||
// NewAMP generate a new AMP record with the given root_share, set_id, and
|
||||
// child_index.
|
||||
func NewAMP(rootShare, setID [32]byte, childIndex uint32) *AMP {
|
||||
|
Reference in New Issue
Block a user