mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-01 18:27:43 +02:00
lnwallet: pack paymentDescriptor add/remove heights into Duals
The purpose of this commit is to begin the process of packing symmetric fields into the newly introduced Dual structure. The reason for this is that the Dual structure has a handy indexing method where we can supply a ChannelParty and get back a value. This will cut down on the amount of branching code in the main lines of the codebase logic, making it easier to follow what is going on.
This commit is contained in:
@@ -109,10 +109,10 @@ func newAuxHtlcDescriptor(p *paymentDescriptor) AuxHtlcDescriptor {
|
||||
ParentIndex: p.ParentIndex,
|
||||
EntryType: p.EntryType,
|
||||
CustomRecords: p.CustomRecords.Copy(),
|
||||
addCommitHeightRemote: p.addCommitHeightRemote,
|
||||
addCommitHeightLocal: p.addCommitHeightLocal,
|
||||
removeCommitHeightRemote: p.removeCommitHeightRemote,
|
||||
removeCommitHeightLocal: p.removeCommitHeightLocal,
|
||||
addCommitHeightRemote: p.addCommitHeights.Remote,
|
||||
addCommitHeightLocal: p.addCommitHeights.Local,
|
||||
removeCommitHeightRemote: p.removeCommitHeights.Remote,
|
||||
removeCommitHeightLocal: p.removeCommitHeights.Local,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user