lnrpc: add new StaticRemoteKey field to ListChannels output

This commit is contained in:
Olaoluwa Osuntokun 2019-09-11 05:45:27 -07:00
parent 2dddbc84d9
commit 8ce76fff51
No known key found for this signature in database
GPG key ID: BC13F65E2DC84465
4 changed files with 562 additions and 534 deletions

File diff suppressed because it is too large Load diff

View file

@ -1237,6 +1237,14 @@ message Channel {
The minimum satoshis the other node is required to reserve in its balance.
*/
int64 remote_chan_reserve_sat = 21 [json_name = "remote_chan_reserve_sat"];
/**
If true, then this channel uses the modern commitment format where the key
in the output of the remote party does not change each state. This makes
back up and recovery easier as when the channel is closed, the funds go
directly to that key.
*/
bool static_remote_key = 22 [json_name = "static_remote_key"];
}

View file

@ -1654,6 +1654,11 @@
"type": "string",
"format": "int64",
"description": "*\nThe minimum satoshis the other node is required to reserve in its balance."
},
"static_remote_key": {
"type": "boolean",
"format": "boolean",
"description": "*\nIf true, then this channel uses the modern commitment format where the key\nin the output of the remote party does not change each state. This makes\nback up and recovery easier as when the channel is closed, the funds go\ndirectly to that key."
}
}
},

View file

@ -2684,6 +2684,7 @@ func createRPCOpenChannel(r *rpcServer, graph *channeldb.ChannelGraph,
ChanStatusFlags: dbChannel.ChanStatus().String(),
LocalChanReserveSat: int64(dbChannel.LocalChanCfg.ChanReserve),
RemoteChanReserveSat: int64(dbChannel.RemoteChanCfg.ChanReserve),
StaticRemoteKey: dbChannel.ChanType.IsTweakless(),
}
for i, htlc := range localCommit.Htlcs {