Skip to content

getroutes: amounts and delays are wrong #7550

@daywalker90

Description

@daywalker90

I'm trying the new getroutes @rustyrussell and i encountered this:

regtest l1->l2->l3

[GetroutesRoutes { amount_msat: Amount { msat: 100000000 }, path: [GetroutesRoutesPath { amount_msat: Amount { msat: 100001001 }, delay: 11, direction: 1, next_node_id: PublicKey(*snip*), short_channel_id: ShortChannelId(114349209354240) }, GetroutesRoutesPath { amount_msat: Amount { msat: 100001001 }, delay: 11, direction: 0, next_node_id: PublicKey(*snip*), short_channel_id: ShortChannelId(114349209419776) }], probability_ppm: 900044 }]

with auto layers applied. Notice how the second Amount in the path is not Amount { msat: 100000000 } but Amount { msat: 100001001 } instead. So the l2 node does not get paid and errors rightfully with WIRE_FEE_INSUFFICIENT.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions