mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 06:34:20 +01:00
offers: fix pay where we are using deprecated apis.
In this case, "fee_base_msat" from `listincoming` has `msat` appended. Fixes: #5850 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Vincenzo Palazzo
parent
e8f9366a29
commit
35acdc112f
@@ -280,6 +280,7 @@ static struct command_result *listincoming_done(struct command *cmd,
|
||||
const jsmntok_t *pftok;
|
||||
u8 *features;
|
||||
const char *err;
|
||||
struct amount_msat feebase;
|
||||
|
||||
err = json_scan(tmpctx, buf, t,
|
||||
"{id:%,"
|
||||
@@ -295,7 +296,7 @@ static struct command_result *listincoming_done(struct command *cmd,
|
||||
JSON_SCAN(json_to_msat, &ci.capacity),
|
||||
JSON_SCAN(json_to_msat, &ci.htlc_min),
|
||||
JSON_SCAN(json_to_msat, &ci.htlc_max),
|
||||
JSON_SCAN(json_to_u32, &ci.feebase),
|
||||
JSON_SCAN(json_to_msat, &feebase),
|
||||
JSON_SCAN(json_to_u32, &ci.feeppm),
|
||||
JSON_SCAN(json_to_u32, &ci.cltv),
|
||||
JSON_SCAN(json_to_short_channel_id, &ci.scid),
|
||||
@@ -306,7 +307,7 @@ static struct command_result *listincoming_done(struct command *cmd,
|
||||
err);
|
||||
continue;
|
||||
}
|
||||
|
||||
ci.feebase = feebase.millisatoshis; /* Raw: feebase */
|
||||
any_public |= ci.public;
|
||||
|
||||
/* Not presented if there's no channel_announcement for peer:
|
||||
|
||||
@@ -4556,7 +4556,6 @@ def test_offer(node_factory, bitcoind):
|
||||
assert 'recurrence: every 600 seconds paywindow -10 to +600 (pay proportional)\n' in output
|
||||
|
||||
|
||||
@pytest.mark.xfail(strict=True)
|
||||
def test_offer_deprecated_api(node_factory, bitcoind):
|
||||
l1, l2 = node_factory.line_graph(2, opts={'experimental-offers': None,
|
||||
'allow-deprecated-apis': True})
|
||||
|
||||
Reference in New Issue
Block a user