Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Authentication retries can exceed the configured maximum, and the new test can hang indefinitely on regressions.
2 open findings
What changed in this PR
Adds a configurable parent-fetch RPC timeout, increasing the default from 5 to 15 seconds.
Changes:
- Adds and validates the
parent_fetch_timeout_secondssetting. - Extends JSON-RPC calls to accept custom timeouts.
- Tests successful and timed-out parent fetches.
| File | Description |
|---|---|
src/datum_conf.c |
Defines and validates the timeout setting. |
src/datum_conf.h |
Stores the configured timeout. |
src/datum_jsonrpc.c |
Implements custom RPC timeouts. |
src/datum_jsonrpc.h |
Exposes the timeout-aware RPC function. |
src/datum_parent_fetch.c |
Applies the configured timeout. |
src/datum_parent_fetch_tests.c |
Tests success and timeout behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // Authentication failure using cookie; reload cookie file and try again | ||
| if (!update_rpc_cookie(cfg)) return NULL; | ||
| return json_rpc_call(curl, cfg->bitcoind_rpcurl, cfg->bitcoind_rpcuserpass, rpc_req); | ||
| return json_rpc_call_full(curl, cfg->bitcoind_rpcurl, cfg->bitcoind_rpcuserpass, rpc_req, NULL, NULL, timeout_seconds); |
Author
There was a problem hiding this comment.
I think this behaviour is acceptable. The parent fetch is just part of a longer process, and this timeout is for the fetch itself.
Comment on lines
+83
to
+85
| for (unsigned request_index = 0; request_index < 2; ++request_index) { | ||
| const int client = accept(server->listen_fd, NULL, NULL); | ||
| if (client < 0) return NULL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Seeing occasional parent-fetch timeouts on CONVOY, so give bitcoind a bit more time.