Skip to content

Add an 'id' field to commando requests#22

Open
niftynei wants to merge 2 commits into
jb55:masterfrom
niftynei:nifty/go_id
Open

Add an 'id' field to commando requests#22
niftynei wants to merge 2 commits into
jb55:masterfrom
niftynei:nifty/go_id

Conversation

@niftynei

@niftynei niftynei commented Jul 4, 2023

Copy link
Copy Markdown
Contributor

Tested for the golang one, the commando one probably needs some more test runs.

Fixes the error where commando requires an id field at the top level for calls.

@jb55 jb55 closed this Jul 4, 2023
@jb55 jb55 reopened this Jul 4, 2023
Comment thread commando.c Outdated
cursor_push_str(&msgbuf, ",\"rune\":\"") &&
cursor_push_str(&msgbuf, rune) &&
cursor_push_str(&msgbuf, "\",\"id\":\"") &&
cursor_push_u64(&msgbuf, (u64)req_id) &&

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't push a string, this pushes a raw u64

@niftynei

niftynei commented Jul 5, 2023 via email

Copy link
Copy Markdown
Contributor Author

@jb55

jb55 commented Jul 5, 2023 via email

Copy link
Copy Markdown
Owner

@niftynei
niftynei force-pushed the nifty/go_id branch 2 times, most recently from dd1ccf9 to 88fe3d5 Compare November 10, 2023 22:34
@niftynei

Copy link
Copy Markdown
Contributor Author

Updated: now the c code uses char * for ids (which matches underlying update)

@jb55

jb55 commented Nov 27, 2023 via email

Copy link
Copy Markdown
Owner

@niftynei

Copy link
Copy Markdown
Contributor Author

Is this still a number?

I think any string is valid now? Yeah it definitely breaks the API for users downstream of the C library.

@jb55

jb55 commented Nov 30, 2023 via email

Copy link
Copy Markdown
Owner

@niftynei
niftynei force-pushed the nifty/go_id branch 2 times, most recently from 0a672a7 to 2396322 Compare November 30, 2023 21:23
turn the type from int to string -> print directly to CLN
Lets us send a bunch of messages at once (but currently incredibly
not thread safe lol)
@jb55

jb55 commented Dec 1, 2023 via email

Copy link
Copy Markdown
Owner

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 this pull request may close these issues.

2 participants