Fix config parsing bugs and split the config tests (#5180) * Split the config tests by the layer they exercise The toml suite mixed tests of the table wrapper with tests of the config classes that sit on top of it. The wrapper tests move to a tomlconfig suite in their own file, leaving toml.cpp to the toml_config tests of daemon_config, rpc_config and log_config. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Apply the configured RPC IPC address The RPC config deserializer parsed process.ipc_address correctly but then stored the RPC bind address in its place, so the key had no effect. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Generate the RPC sample config for the active network --generate_config rpc always used dev network constants, so the printed default port ignored --network. The node branch already used the active network. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Return an empty table for a missing or non-table child get_required_child returned the parent table when the key was missing, so the caller went on reading the parent's keys as if they were the child's. Both child lookups also dereferenced a null table when the key held a plain value. Report the error and hand back an empty table instead. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Reject negative numbers for unsigned settings lexical_cast wraps a negative number into an unsigned target, so `bandwidth_limit = -1` was accepted as 18446744073709551615 instead of being reported. Values destined for an unsigned type are now checked for a minus sign first. The stringified value is also checked for presence before being dereferenced, which a key holding a table or an array would previously have done on a null optional. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Derive config type descriptions from the type Type descriptions were a list of explicit specializations, so any type not on the list fell through to "an unknown type". size_t, which several node settings use, is such a type on platforms where it is neither uint64_t nor unsigned int, and addresses had no description at all. A single if constexpr chain derives the description from the type instead, covering every integral width and naming IPv6 addresses. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Remove leftovers from the config classes Drop a duplicated enable_sign_hash getter, an unused qtwallet config path and a redundant table copy in daemon_config, jsonconfig includes that no config translation unit uses any more, and a typo in an lmdb type annotation. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Keep the first configuration error The child lookups assigned the error object directly, so a structural problem found late in a document replaced the parse failure that came before it and the loader reported the wrong cause. They now go through set_error_once, which follows the policy configbase already documents for conditionally_set_error: the first error is the one that explains the rest. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Cover non-scalar values at scalar keys A table or an array where a setting expects a scalar is rejected with invalid_value and the target keeps the value it had. Nothing exercised that shape before, the tests only ever fed wrong scalars. String targets are the case that depends on the presence check in get_config: an empty string converts successfully, so without the check a non-scalar would be read as an empty value instead of being reported. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
__________
Type: commit
Hash: 0e741ee22ed84f4ed6574252a9b2f442bc340aaf
Created: today
__________
gr0v1ty/nano-node:0e741ee22ed84f4ed6574252a9b2f442bc340aaf
| Test Case | Status | Duration | Median Deviation | Log | Graph |
|---|---|---|---|---|---|
| 5n4pr_conf_10k_bintree | PASS | 113 s | 0.5 s | - | Show |
| 5n4pr_conf_10k_change | PASS | 137 s | -7.0 s | - | Show |
| 5n4pr_conf_change_dependant | PASS | 131 s | 16.0 s | - | - |
| 5n4pr_conf_change_independant | PASS | 106 s | -11.0 s | - | - |
| 5n4pr_conf_send_dependant | PASS | 114 s | 0.5 s | - | - |
| 5n4pr_conf_send_independant | PASS | 107 s | -9.5 s | - | - |
| 5n4pr_rocks_10k_bintree | PASS | 118 s | 2.5 s | - | - |
| 5n4pr_rocks_10k_change | PASS | 166 s | 3.5 s | - | - |