ElementsProject / ElementsProject/lightning
Make the UNUSUAL warning in plugin-bcli depend on rpcclienttimeout
- Dominant language
- C
- Stars
- 3.1k
- Forks
- 1k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 13
Description
If a user has set `rpcclienttimeout` to a higher value than the default 60 seconds, it seems logical that the corresponding UNUSUAL warning in `bcli_finished` when a rpc request takes longer than 10 seconds, should also increase proportionally.
This is how I've implemented it (in `bcli_finished`, `plugin-bcli`) but if this change is desired, I leave it to the developers to implement it in the proper manner.
```
u64 msec_unusual;
/* For default rpcclienttimeout=60, "msec_unusual" should equal 10 seconds -> 10000 msec */
msec_unusual=(u64) (bitcoind->rpcclienttimeout/6*1000);
if (msec > msec_unusual)
plugin_log(bcli->cmd->plugin, LOG_UNUSUAL,
"bitcoin-cli: finished %s (%"PRIu64" msec)",
bcli_args(tmpctx, bcli), msec);
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.