Skip to content

lnwire: add InboundFee struct in-line within ChannelUpdate #8604

Open

Description

@Roasbeef

In #6703 the new inbound fee field is added. However, it isn't added directly to the struct, instead the caller must always manually copy the field into the opaque data field, and also must always manually parse it out the other end. We should make this new field uniform with the other TLC fields by adding it directly within the struct. While we're at it, we can also morph it into tlv.OptionalRecord.

Activity

  1. added
    enhancementImprovements to existing features / behaviour
    wire protocolEncoding of messages for the communication between nodes
    intermediateIssues suitable for developers moderately familiar with the codebase and LN
    feesRelated to the fees paid for transactions (both LN and funding/commitment transactions)
    inbound feeChanges related to inbound routing fee
    on Mar 30, 2024
  2. added
    P1MUST be fixed or reviewed
    P2should be fixed if one has time
    and removed
    P1MUST be fixed or reviewed
    on Apr 2, 2024
  3. joostjager commented on Apr 4, 2024

    @joostjager
    Contributor

    Inbound fees are using a custom tlv id in the high range. I think this would require more flexibility in gen_tlv_types.go?

  4. Roasbeef commented on Apr 10, 2024

    @Roasbeef
    MemberAuthor

    @joostjager good question, so we can just make entirely new definitions, if we don't want to add 40k extra lines to that file, like so:

    type tlvType50000 {}
    
    func (t tlvType50000) TypeVal() {
        50_000
    }
    
    func (t tlvType50000) tlv() {}
    
    
    type TlvType50000 = *tlvType50000

    The set up doesn't require that only the code generation be used, just that all new instnaces must be defined in the package.

    Not explcitily related, but while we're at it, we can likely simplify from tlv.TlvType5 to tlv.Type5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2should be fixed if one has timeenhancementImprovements to existing features / behaviourfeesRelated to the fees paid for transactions (both LN and funding/commitment transactions)inbound feeChanges related to inbound routing feeintermediateIssues suitable for developers moderately familiar with the codebase and LNwire protocolEncoding of messages for the communication between nodes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions