Skip to content

Commit

Permalink
gl-plugin: Fix breaks due to proto rename
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Neuroth <[email protected]>
  • Loading branch information
nepet committed Jul 25, 2024
1 parent 4572b98 commit 6fdc56c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions libs/gl-client-py/glclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,10 @@ def pay(
bytes(self.inner.call(uri, bytes(req)))
)

def trampoline_pay(self, bolt11: str, trmp_node_id: bytes, amount_msat: Optional[int] = None, label: Optional[str] = None):
def trampoline_pay(self, bolt11: str, trampoline_node_id: bytes, amount_msat: Optional[int] = None, label: Optional[str] = None):
res = self.inner.trampoline_pay(
bolt11=bolt11,
trmp_node_id=trmp_node_id,
trampoline_node_id=trampoline_node_id,
amount_msat=amount_msat,
label=label,
)
Expand Down
2 changes: 1 addition & 1 deletion libs/gl-client-py/glclient/glclient.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Node:
def trampoline_pay(
self,
bolt11: str,
trmp_node_id: bytes,
trampoline_node_id: bytes,
amount_msat: Optional[int] = None,
label: Optional[str] = None,
) -> bytes: ...
Expand Down
4 changes: 2 additions & 2 deletions libs/gl-client-py/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl Node {
fn trampoline_pay(
&self,
bolt11: String,
trmp_node_id: Vec<u8>,
trampoline_node_id: Vec<u8>,
amount_msat: Option<u64>,
label: Option<String>,
maxfeepercent: Option<f32>,
Expand All @@ -69,7 +69,7 @@ impl Node {
) -> PyResult<Vec<u8>> {
let req = pb::TrampolinePayRequest {
bolt11,
trmp_node_id,
trampoline_node_id,
amount_msat: amount_msat.unwrap_or_default(),
label: label.unwrap_or_default(),
maxfeepercent: maxfeepercent.unwrap_or_default(),
Expand Down
6 changes: 3 additions & 3 deletions libs/gl-plugin/src/tramp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const MAX_DELAY_DEFAULT: u32 = 2016;
const DEFAULT_OVERPAY_PERCENT: f32 = 0.5;
// Type used to address bolt11 in the onion payload.
const TLV_BOLT11: u64 = 33001;
// Type used to address the amount in msat in the onion payload, in case
// Type used to address the amount in msat in the onion payload, in case
// that the bolt11 does not have an amount set.
const TLV_AMT_MSAT: u64 = 33003;

Expand Down Expand Up @@ -53,11 +53,11 @@ pub async fn trampolinepay(
req: pb::TrampolinePayRequest,
rpc_path: impl AsRef<Path>,
) -> Result<cln_rpc::model::responses::PayResponse> {
let node_id = cln_rpc::primitives::PublicKey::from_slice(&req.trmp_node_id[..])?;
let node_id = cln_rpc::primitives::PublicKey::from_slice(&req.trampoline_node_id[..])?;

log::debug!(
"New trampoline payment via {}: {} ",
hex::encode(req.trmp_node_id),
hex::encode(req.trampoline_node_id),
req.bolt11.clone()
);

Expand Down

0 comments on commit 6fdc56c

Please sign in to comment.