|
|
|
@ -1843,22 +1843,24 @@ func createInitChannels(revocationWindow int) (*lnwallet.LightningChannel, *lnwa
|
|
|
|
|
return nil, nil, nil, err |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
commitFee := feePerKw.FeeForWeight(input.CommitWeight) |
|
|
|
|
|
|
|
|
|
// TODO(roasbeef): need to factor in commit fee?
|
|
|
|
|
aliceCommit := channeldb.ChannelCommitment{ |
|
|
|
|
CommitHeight: 0, |
|
|
|
|
LocalBalance: lnwire.NewMSatFromSatoshis(channelBal), |
|
|
|
|
LocalBalance: lnwire.NewMSatFromSatoshis(channelBal - commitFee), |
|
|
|
|
RemoteBalance: lnwire.NewMSatFromSatoshis(channelBal), |
|
|
|
|
FeePerKw: btcutil.Amount(feePerKw), |
|
|
|
|
CommitFee: 8688, |
|
|
|
|
CommitFee: commitFee, |
|
|
|
|
CommitTx: aliceCommitTx, |
|
|
|
|
CommitSig: bytes.Repeat([]byte{1}, 71), |
|
|
|
|
} |
|
|
|
|
bobCommit := channeldb.ChannelCommitment{ |
|
|
|
|
CommitHeight: 0, |
|
|
|
|
LocalBalance: lnwire.NewMSatFromSatoshis(channelBal), |
|
|
|
|
RemoteBalance: lnwire.NewMSatFromSatoshis(channelBal), |
|
|
|
|
RemoteBalance: lnwire.NewMSatFromSatoshis(channelBal - commitFee), |
|
|
|
|
FeePerKw: btcutil.Amount(feePerKw), |
|
|
|
|
CommitFee: 8688, |
|
|
|
|
CommitFee: commitFee, |
|
|
|
|
CommitTx: bobCommitTx, |
|
|
|
|
CommitSig: bytes.Repeat([]byte{1}, 71), |
|
|
|
|
} |
|
|
|
|