Skip to content

rpc: add expiry field to getgeneralinfo#247

Open
Retropex wants to merge 1 commit intobitcoinknots:29.x-knotsfrom
Retropex:rpcexpiry
Open

rpc: add expiry field to getgeneralinfo#247
Retropex wants to merge 1 commit intobitcoinknots:29.x-knotsfrom
Retropex:rpcexpiry

Conversation

@Retropex
Copy link
Copy Markdown

Useful for external software who want to be able to fetch when bitcoind will expire.

@TH3BAT
Copy link
Copy Markdown

TH3BAT commented Jan 14, 2026

Knots exposing expiry via RPC is the correct layer.
Expiry is node self-knowledge, not something a dashboard should infer or scrape from logs. An explicit getexpiry (or similar) RPC keeps it authoritative and future-proof.

@luke-jr
Copy link
Copy Markdown
Collaborator

luke-jr commented Jan 22, 2026

Not sure having its own RPC makes sense. Maybe one of the existing get*info is a good place?

@Retropex
Copy link
Copy Markdown
Author

Make sense, I will update

Comment thread src/rpc/node.cpp Outdated
Comment thread src/rpc/node.cpp Outdated
@Retropex Retropex force-pushed the rpcexpiry branch 2 times, most recently from 5b1eef4 to 86b4d02 Compare February 2, 2026 09:59
Comment thread src/rpc/node.cpp Outdated
Comment thread src/rpc/node.cpp Outdated
@Retropex Retropex changed the title rpc: add getexpiry call rpc: add expiry field to getgeneralinfo Feb 3, 2026
@Retropex Retropex force-pushed the rpcexpiry branch 2 times, most recently from 2820f17 to 27d5725 Compare February 10, 2026 16:08
@Retropex
Copy link
Copy Markdown
Author

Instead of mixing types, I have moved the timestamp in a JSON object and added a status field that return true of false depending on if bitcoind is set to expire or not.

@luke-jr
Copy link
Copy Markdown
Collaborator

luke-jr commented Apr 15, 2026

How about [going back to a single field and] just using maxint if expiry is disabled?

@Retropex
Copy link
Copy Markdown
Author

Like returning INT64_MAX if expiry is disabled?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants