The timestamp in the file didn't match the comment or the block height
(this doesn't break anything; the timestamp is only used for future
block arrival estimates).
This header is stupid and gross and is only used from wallet2. Remove
it from common/ to contain the damage within wallet2.
simplewallet.cpp includes it just for fun, but never actually uses it,
because why not?
This `getKeyFromBlockchain` function is completely moronic: it doesn't
do anything with its `reference_index`, and has a commented description
that doesn't match the actual implementation at all.
Moreover the `reference_index` argument, at once place here, is passed a
*function pointer cast to a size_t*. A generous interpretation is the
author knew that it wasn't being used, and thus could be passed the
abitrary address of a function that happens to return a random value --
but it's all fine because the argument isn't used, right?
Replace it with a .randomize() on ctkey that does the same thing, but
with 97% less moron.
This code is beyond pathetic. I am starting to see why some people need
Rust to guard their incompetence away from the code they write.
The logging refactor brought in some changes to how the logs are
created and as a result logs were polluting the command line where wallet2 was
displaying information. This makes the logging for wallet only to file
and stdout is reserved to the wallet to communicate to the user.
`get_service_nodes` no longer includes the `"reserved"` field if there
is no unfilled reservation, but wallet2 was expecting it.
This makes it okay with not having it.
Along the way this converts various `[]` to `.at()` to throw proper
exceptions when the key being accessed doesn't exist.
They should not have a body set (even if empty), but did, causing the
request handler to try to parse it as json and failing.
Fixes it to only set the body to a string if we actually have a
non-empty body to set.
- Adds script to extract markdown from the rpc comments to build a docs
page suitable for docsify.
- Split up daemon rpc docs logically into sections
- Reformat (mostly rewrapping) various docs entries
- Add examples, many of which are live-fetched at documentation
generation time.
- Mark various required options as `required{...}` so that they produce
an error if not provided in a request.
Using string_view is slightly faster as it lets us get a view directly
into nlohmann's string value, rather than making an intermediate copy
into a temporary string.
Manually creating json the way we were doing is dumb. This redoes it
using nlohmann::json, which in turn lets us merge the serialized json
into rpc results.
They are really buggy and produce tons of false positives and, as far as
I've seen, no true positives so just disable them.
I kept this only to 12.x in the hope that gcc 13 will improve the
warning's usefulness.
We removed it at some point during the RPC refactor because its purpose
is replaced by get_transactions' new `memory_pool` parameter, but we
also need a wrapper to do that for older clients making direct
`get_transaction_pool` rpc requests.
This was throwing when there was no pow_hash (can't construct a string
from a nullptr).
It doesn't make much sense to stick an empty string there at all,
though, so this amends it to only set the `pow_hash` key when there is
something to set (rather than setting it to an empty string).
This call can make the node do a full tx scan for state change
transactions, which can be expensive. It is currently only used in the
oxend CLI interface, so seems fine to make admin-restricted.