server: use private parameter when opening channel

This commit is contained in:
nsa 2017-11-13 15:48:54 -08:00 committed by Olaoluwa Osuntokun
parent 17c98473d9
commit 9fcb845bd2
1 changed files with 5 additions and 1 deletions

View File

@ -1453,6 +1453,8 @@ type openChanReq struct {
fundingFeePerWeight btcutil.Amount
private bool
// TODO(roasbeef): add ability to specify channel constraints as well
updates chan *lnrpc.OpenStatusUpdate
@ -1570,7 +1572,8 @@ func (s *server) DisconnectPeer(pubKey *btcec.PublicKey) error {
// NOTE: This function is safe for concurrent access.
func (s *server) OpenChannel(peerID int32, nodeKey *btcec.PublicKey,
localAmt btcutil.Amount, pushAmt lnwire.MilliSatoshi,
fundingFeePerByte btcutil.Amount) (chan *lnrpc.OpenStatusUpdate, chan error) {
fundingFeePerByte btcutil.Amount,
private bool) (chan *lnrpc.OpenStatusUpdate, chan error) {
updateChan := make(chan *lnrpc.OpenStatusUpdate, 1)
errChan := make(chan error, 1)
@ -1630,6 +1633,7 @@ func (s *server) OpenChannel(peerID int32, nodeKey *btcec.PublicKey,
localFundingAmt: localAmt,
fundingFeePerWeight: fundingFeePerWeight,
pushAmt: pushAmt,
private: private,
updates: updateChan,
err: errChan,
}