When the transaction offset is wrong and doesn't parse we turn the
generic runtime_exception into one that goes back to the API caller.
Also catch those generic exceptions on the server level to avoid this
kind of error from disconnecting a peer.
When getting data from the mempool based on address, we also want to call
the addressUsedInOutput() callback, in order to be consistent.
We pass in the blockheight and offset in block being -1, though.
Memmapping can use any filesize, but the pages are allocated in a power
of two amount.
Assuming 4K pages we now aim to have 65536 pages to map a big file.
This gets around the sillyness where you need an extra dir for a config.
~/.config/flowee/rest-service/rest-service.conf
now you can just use
~/.config/flowee/rest-service.conf
Instead of assigning a privacy segment at connect, wait until we have
determined if this peer is on the same chain as us before we allocate a
peer slot.
This also helps us limit the amount of peers we send our bloom filter to.
as the expected behavior of 'get*' is a const method, it is harmful to
name a method such when it actually alters the state of the method such
that subsequent calls will produce a different result.
This does remove the feature that mining can use the internal wallet as
a source of coinbase addresses, but since Flowee doesn't actually ship a
wallet, that was just not a good reason to keep an unused class in the
libs.
The CAmount name is not helpful as its just an int64_t and not a
class, like the name implies. There were a handful of places where
it was passed in as const-ref, as a good example of this actually
creating sub-par code.
The method offsetInBlock assumes the block actually is the one this
transaction is in, the assert helps making sure that this assumption
isn't broken, prodicing unusable results.