Skip to content

Commit

Permalink
update protos to current lnd master
Browse files Browse the repository at this point in the history
1. update protos to lnd commit f62c00fe34635c1b68054a9fe018e07e54df4999
2. adjust update_chan_policy
  • Loading branch information
feelancer21 committed May 24, 2024
1 parent 0bc90dd commit 72687ee
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 112 deletions.
216 changes: 109 additions & 107 deletions charge_lnd/grpc_generated/lightning_pb2.py

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions charge_lnd/lnd.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,10 @@ def update_chan_policy(self, chanid, chp: ChanParams):
min_htlc_msat_specified=chp.min_htlc_msat is not None,
max_htlc_msat=(chp.max_htlc_msat if chp.max_htlc_msat is not None else my_policy.max_htlc_msat),
time_lock_delta=(chp.time_lock_delta if chp.time_lock_delta is not None else my_policy.time_lock_delta),
inbound_base_fee_msat=(chp.inbound_base_fee_msat if chp.inbound_base_fee_msat is not None else my_policy.inbound_fee_base_msat),
inbound_fee_rate_ppm=(chp.inbound_fee_ppm if chp.inbound_fee_ppm is not None else my_policy.inbound_fee_rate_milli_msat)
))
inbound_fee=ln.InboundFee(
base_fee_msat=(chp.inbound_base_fee_msat if chp.inbound_base_fee_msat is not None else my_policy.inbound_fee_base_msat),
fee_rate_ppm=(chp.inbound_fee_ppm if chp.inbound_fee_ppm is not None else my_policy.inbound_fee_rate_milli_msat)
)))

def get_txns(self, start_height = None, end_height = None):
return self.lnstub.GetTransactions(ln.GetTransactionsRequest(
Expand Down
15 changes: 13 additions & 2 deletions proto/lightning.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4369,6 +4369,16 @@ message FeeReportResponse {
uint64 month_fee_sum = 4;
}

message InboundFee {
// The inbound base fee charged regardless of the number of milli-satoshis
// received in the channel. By default, only negative values are accepted.
int32 base_fee_msat = 1;

// The effective inbound fee rate in micro-satoshis (parts per million).
// By default, only negative values are accepted.
int32 fee_rate_ppm = 2;
}

message PolicyUpdateRequest {
oneof scope {
// If set, then this update applies to all currently active channels.
Expand Down Expand Up @@ -4402,8 +4412,9 @@ message PolicyUpdateRequest {
// If true, min_htlc_msat is applied.
bool min_htlc_msat_specified = 8;

int32 inbound_base_fee_msat = 10;
int32 inbound_fee_rate_ppm = 11;
// Optional inbound fee. If unset, the previously set value will be
// retained [EXPERIMENTAL].
InboundFee inbound_fee = 10;
}

enum UpdateFailure {
Expand Down

0 comments on commit 72687ee

Please sign in to comment.