Skip to content

Make the UNUSUAL warning in plugin-bcli depend on rpcclienttimeout #8391

Open
@hMsats

Description

@hMsats

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions