libplugin: don't spew datastore errors to LOG_DEBUG.

People get upset, especially as our "not found" error can be a bit
hard to read!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
See-also: #5990
This commit is contained in:
Rusty Russell
2023-02-10 14:53:53 +10:30
committed by Alex Myers
parent dd9400df99
commit 70aee52903
6 changed files with 56 additions and 47 deletions

View File

@@ -310,17 +310,19 @@ void rpc_scan(struct plugin *plugin,
const char *guide,
...);
/* Helper to scan datastore: can only be used in init callback. *
Returns false if field does not exist. * path is /-separated. Final
arg is JSON_SCAN or JSON_SCAN_TAL.
/* Helper to scan datastore: can only be used in init callback. Returns error
* msg (usually meaning field does not exist), or NULL on success. path is
* /-separated. Final arg is JSON_SCAN or JSON_SCAN_TAL.
*/
bool rpc_scan_datastore_str(struct plugin *plugin,
const char *path,
...);
const char *rpc_scan_datastore_str(const tal_t *ctx,
struct plugin *plugin,
const char *path,
...);
/* This variant scans the hex encoding, not the string */
bool rpc_scan_datastore_hex(struct plugin *plugin,
const char *path,
...);
const char *rpc_scan_datastore_hex(const tal_t *ctx,
struct plugin *plugin,
const char *path,
...);
/* This sets batching of database commitments */
void rpc_enable_batching(struct plugin *plugin);