Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define custom json formatting for channel origin #1611

Closed
pm47 opened this issue Nov 19, 2020 · 0 comments · Fixed by #1641
Closed

Define custom json formatting for channel origin #1611

pm47 opened this issue Nov 19, 2020 · 0 comments · Fixed by #1641
Assignees

Comments

@pm47
Copy link
Member

pm47 commented Nov 19, 2020

It has been broken when we refactored the types.

Currently it looks like this:

"originChannels": {
        "6": {
          "replyTo": {
            "path": {
              "parent": {
                "parent": {
                  "parent": {
                    "parent": {
                      "parent": {
                        "parent": {
                          "address": {
                            "protocol": "akka",
                            "system": "eclair-node"
                          },
                          "name": "/"
                        },
                        "name": "user",
                        "uid": 0
                      },
                      "name": "$j",
                      "uid": 560290201
                    },
                    "name": "relayer",
                    "uid": 649831089
                  },
                  "name": "channel-relayer",
                  "uid": -1728719205
                },
                "name": "d9e62dae-8be0-4333-9de3-6ce368b6d4d5",
                "uid": -1018113206
              },
              "name": "$$a-adapter",
              "uid": 662265840
            },
            "provider": {}
          },

We could serialize the origin like so:

{
  "origin": "local-hot"
  "uuid": "......"
}
{
  "origin": "local-cold"
  "uuid": "......"
}
{
  "origin": "channel-relayed-hot"
  "origin": {
    "originChannelId": "...",
    "originHtlcId": "..."
  }
}
{
  "origin": "channel-relayed-hot"
    "origin": {
    "originChannelId": "...",
    "originHtlcId": "..."
  }
}
{
  "origin": "trampoline-relayed-hot"
    "origins": [
    {
      "originChannelId": "...",
      "originHtlcId": "..."
    },
    {
      "originChannelId": "...",
      "originHtlcId": "..."
    }
    ]
}
{
  "origin": "trampoline-relayed-cold"
    "origins": [
    {
      "originChannelId": "...",
      "originHtlcId": "..."
    },
    {
      "originChannelId": "...",
      "originHtlcId": "..."
    }
    ]
}
@t-bast t-bast self-assigned this Dec 15, 2020
t-bast added a commit that referenced this issue Dec 15, 2020
A recent refactoring to include a `replyTo` parameter made the JSON
serialization ugly and hard to work with.

Fixes #1611
t-bast added a commit that referenced this issue Dec 16, 2020
A recent refactoring to include a `replyTo` parameter made the JSON
serialization ugly and hard to work with.

Fixes #1611
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants