Small refactor; move the partition check away from main and the obsolete
global variables we used to use, instead now just add it to the DB which
owns the data it works on.
This fixes the bug that in various cases we'd incorrectly get a warning
about no blocks being found in the last N hours.
Transactions are only kept in the mempool a limited time before they are
removed and have to be re-entered by the owner of the transaction.
To keep mempools from being too different from the rest of the network we
can flush them based on the fact that if a tx hasn't been included yet in
this time, miners are not seeing it.
At popular demand, move the installing of the cmake support file
that lets external projects find the Flowee libs to our libs dir.
This has the effect that a user can selectively compile and install
the libs dir only in order to use our libraries.
The callback on each transaction was only called when individual tx
were fetched, which is "magic" behaviour and I don't like
inconsistencies.
So, also call the callback for each transaction in a block we fetched.
This will most likely benefit some FloweeJS users when they do some stuff
that I didn't think a good idea, at least this way they will not get
a bunch of errors :)
To send out transactions in the p2p net is quite a lot of work,
you need to find multiple peers to send the transaction to. First
you send an INV, then you respond to a getData to actually send
the transaction and last you wait for 'reject' messages that may
indicate that there is something wrong with the transaction.
This introduces the BroadcastTxData class that wraps a transaction
and gets callbacks for sending and for rejects, abstracting away
all the complexity for the user.
The uint256 and CKeyID classes are the same baseclass with template
differences only, which makes them fragile to use for overloading.
As such rename the convenience overload slightly.
The usage of byte-array in json is not well defined, and as such Qt just
no longer handles it as it could end up causing out-of-bounds issues.
This misuse is limited to our unit test, so this is a cheap update.
Ref; https://bugreports.qt.io/browse/QTBUG-84739
Instead of using open(), which makes unavailable the normal method,
use a new methodname instead.
This issue is a bit of an anti-pattern and it would likely be beneficial
to avoid having this as a subclass at all.
The latest Qt (5.15) is advertised to be the last before Qt6.
As a result the Qt devs have already made a lot of small refactors,
but just mark old methods deprecated.
When we start requiring at minimum Qt5.15 this will help us, so far
the deprecation methods are just noise we can't fix without
breaking people's builds. So turn them off.