diff --git a/lnwallet/channel.go b/lnwallet/channel.go index 2d595931..0e6a5936 100644 --- a/lnwallet/channel.go +++ b/lnwallet/channel.go @@ -94,7 +94,7 @@ func (lc *LightningChannel) VerifyCommitmentUpdate() error { // createCommitTx... func createCommitTx(fundingOutput *wire.TxIn, ourKey, theirKey *btcec.PublicKey, - revokeHash [wire.HashSize]byte, csvTimeout int64, channelAmt btcutil.Amount) (*wire.MsgTx, error) { + revokeHash [wire.HashSize]byte, csvTimeout uint32, channelAmt btcutil.Amount) (*wire.MsgTx, error) { // First, we create the script paying to us. This script is spendable // under two conditions: either the 'csvTimeout' has passed and we can @@ -112,7 +112,7 @@ func createCommitTx(fundingOutput *wire.TxIn, ourKey, theirKey *btcec.PublicKey, // Otherwise, we can re-claim our funds after a CSV delay of // 'csvTimeout' timeout blocks, and a valid signature. - scriptToUs.AddInt64(csvTimeout) + scriptToUs.AddInt64(int64(csvTimeout)) scriptToUs.AddOp(txscript.OP_NOP3) // CSV scriptToUs.AddOp(txscript.OP_DROP) scriptToUs.AddData(ourKey.SerializeCompressed()) diff --git a/lnwallet/reservation.go b/lnwallet/reservation.go index 668ce6db..fd0e8b14 100644 --- a/lnwallet/reservation.go +++ b/lnwallet/reservation.go @@ -38,7 +38,7 @@ type ChannelContribution struct { // The delay (in blocks) to be used for the pay-to-self output in this // party's version of the commitment transaction. - CsvDelay int64 + CsvDelay uint32 } // ChannelReservation... @@ -51,7 +51,7 @@ type ChannelReservation struct { // For CLTV it is nLockTime, for CSV it's nSequence, for segwit it's // not needed - fundingLockTime int64 + fundingLockTime uint32 // In order of sorted inputs. Sorting is done in accordance // to BIP-69: https://github.com/bitcoin/bips/blob/master/bip-0069.mediawiki. @@ -92,8 +92,10 @@ func newChannelReservation(t FundingType, fundingAmt btcutil.Amount, }, partialState: &OpenChannelState{ // TODO(roasbeef): assumes balanced symmetric channels. - Capacity: fundingAmt * 2, - MinFeePerKb: minFeeRate, + Capacity: fundingAmt * 2, + OurBalance: fundingAmt, + TheirBalance: fundingAmt, + MinFeePerKb: minFeeRate, }, reservationID: id, wallet: wallet,