lnwallet: update funding flow to use new channeldb API's

This commit is contained in:
Olaoluwa Osuntokun committed 2017-11-10 19:50:59 -08:00
1 parent 367c6b10fc
commit 7f667e2dbc
2 files changed
+31 -21

No files matched your search

+18 -10
View File
@@ -205,16 +205,24 @@ func NewChannelReservation(capacity, fundingAmt, feePerKw btcutil.Amount,
ChannelConfig: &channeldb.ChannelConfig{},
},
partialState: &channeldb.OpenChannel{
ChainHash: *chainHash,
Db: wallet.Cfg.Database,
Capacity: capacity,
IsInitiator: initiator,
IsPending: true,
ChanType: chanType,
LocalBalance: ourBalance,
RemoteBalance: theirBalance,
FeePerKw: feePerKw,
CommitFee: commitFee,
ChanType: chanType,
ChainHash: *chainHash,
IsPending: true,
IsInitiator: initiator,
Capacity: capacity,
LocalCommitment: channeldb.ChannelCommitment{
LocalBalance: ourBalance,
RemoteBalance: theirBalance,
FeePerKw: feePerKw,
CommitFee: commitFee,
},
RemoteCommitment: channeldb.ChannelCommitment{
LocalBalance: ourBalance,
RemoteBalance: theirBalance,
FeePerKw: feePerKw,
CommitFee: commitFee,
},
Db: wallet.Cfg.Database,
},
pushMSat: pushMSat,
reservationID: id,