wallet_api pretend to have `tr()` but really didn't: instead it had it
via a do-nothing macro, but the macro leaked into other places when
headers got sorted that caused all sorts of pain.
This cleans out some of the garbage.
clang-format resulted in some screwy reformatting, particularly with
post-commended fields, and also exposed various missing header includes
when re-sorting headers.
This commit contains various small fixes and improvements to deal with
the formatting issues.
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.