question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve `updaterelayfee` JSON response

See original GitHub issue

Using updaterelayfee with eclair v0.6.2 returns the following:

{
  "4881ea3050bd0d82a571db79984a4c1c432eb77a7349b1afac6198b92d740cca": "RES_SUCCESS(CMD_UPDATE_RELAY_FEE(null,10 msat,150,None),4881ea3050bd0d82a571db79984a4c1c432eb77a7349b1afac6198b92d740cca) (of class fr.acinq.eclair.channel.RES_SUCCESS)"
}

We should instead return something like:

{
  "4881ea3050bd0d82a571db79984a4c1c432eb77a7349b1afac6198b92d740cca": {
    "feeBase": 10,
    "feeProportionalMillionths": 150
  }
}

Or in case of error:

{
  "4881ea3050bd0d82a571db79984a4c1c432eb77a7349b1afac6198b92d740cca": "error message"
}

If possible, we should probably also fix #2001 at the same time.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
pm47commented, Oct 12, 2021

Agree as well. We could have a generic success field, and a specific detailed field:

{
  "success": true,
  "details": {
    "feeBaseMsat": 1000,
    "feeProportionalMillionths": 100
  }
}

And in this case really annoying. As you need to know the channels of the node to check the call worked.

I don’t get this. You would only need to do this if you call several nodes or channels at once, and in that case there is no other way but check each individual response. Otherwise just make one call per channel?

1reaction
n1borcommented, Oct 9, 2021

Also with these APIs a simple common “result”:“ok” or similar for all calls would make life easier for users (in addition to the detailed info). Save having to have custom analysis of each call that needs testing/updating when changes are made.

And in this case really annoying. As you need to know the channels of the node to check the call worked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

11 Ways to Improve JSON Performance & Usage - Stackify
JSON is easy to work with and has become the standard data format for virtually everything. Get a list of common JSON performance...
Read more >
Response.json() - Web APIs - MDN Web Docs
The json() method of the Response interface takes a Response stream and reads it to completion. It returns a promise which resolves with...
Read more >
Blogger JSON API: Performance Tips - Google Developers
This document covers some techniques you can use to improve the performance of your application. In some cases, examples from other APIs or ......
Read more >
How to Loop Through a JSON Response in JavaScript
When fetching data from a remote server, the server's response will often be in JSON format. In this quick tip, I'll demonstrate how...
Read more >
JSON Formatter & Validator
The JSON Formatter & Validator beautifies and debugs JSON data with advanced formatting and validation algorithms.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found