lnwallet: extend Reservation with alias chan-type, feature-bit flags

This extends the Reservation arguments to include whether a pending
channel open has negotiated the zero-conf channel type, the scid-alias
channel type, and/or the scid-alias feature bit. The result of those
negotiates are stored in the OpenChannel's ChanType. The arguments to
NewChannelReservation have also been simplified.
This commit is contained in:
eugene
2022-04-04 16:15:02 -04:00
parent c9f5912601
commit 21c83b0744
3 changed files with 74 additions and 32 deletions

View File

@@ -728,11 +728,17 @@ func testCancelNonExistentReservation(miner *rpctest.Harness,
feePerKw, err := alice.Cfg.FeeEstimator.EstimateFeePerKW(1)
require.NoError(t, err, "unable to query fee estimator")
req := &lnwallet.InitFundingReserveMsg{
CommitFeePerKw: feePerKw,
PushMSat: 10,
Flags: lnwire.FFAnnounceChannel,
CommitType: lnwallet.CommitmentTypeTweakless,
PendingChanID: [32]byte{},
}
// Create our own reservation, give it some ID.
res, err := lnwallet.NewChannelReservation(
10000, 10000, feePerKw, alice, 22, 10, &testHdSeed,
lnwire.FFAnnounceChannel, lnwallet.CommitmentTypeTweakless,
nil, [32]byte{}, 0,
10000, 10000, alice, 22, &testHdSeed, 0, req,
)
require.NoError(t, err, "unable to create res")