This supplies a push notification on txid becoming known to the Hub.
Additionally this changes its close relative the AddressMonitorService
to use a different tag for the transaction data and the
double-spend-proof data so as to make it obvious which one is being
sent.
Move some files back to the server "library".
Merge the 'console' lib with server, as it doesn't really make sense with
just one file and nobody exclusively linking to it.
The server "libary" is not really a library, its the place we put all
the files shared by hub-qt hub-cli and hub.
We no longer depend on these files from other places (mostly due to
moving to the new logging framework) and as such we can move the files
back.
Remove addresses of type ripe160 to be used in the API of AddresMonitor
API service. Instead use a sha256 hash of the entire output script.
This is mostly internal changes not affecting the operations much.
The usage of a ripe160 for bitcoin addresses in the API and in the
Indexer loses some info, specifically what kind of script it is.
Additionally not all types of scripts fit this mold. At best that means
its not future-proof.
This adds a method to the API in order to select from a Tx the hashed
outscript (thats singlehashed sha256) and refactor the address indexer
to use that instead of the ripe160 address.
The API enums broke a little, so I used the opportunity to break it a
lot and clean up the enums in order to make them more future-proof.
But, yeah, software from before this commit is protocol incompatible
with software after this commit.
This means that for apps like 'pos' no longer link against libSSL
The streams no longer zero-after-free, there are no secrets transported
in datastreams so this is useless and avoids linking in one OpenSSL
call.
The insecure_rand() method depended on the openssl code to seed it with
randomness. Now replaced with a proven current-time-milliseconds.
This is enough in those cases because it was always meant to be an
insecure random.
In the address monitor service this detects specifically if a double
spend detected by the Hub is applicable for our subscriber, and if it is
then a Message will be sent to the subscriber.
This introduces a new message type DoubleSpendFound
and changes the API for the TransactionFound message while dropping the
TransactionRejected message.
For service applications that bind to networks (currently
only indexer) this allows users to pass the address:
0.0.0.0
to bind to. The effect will be that we find all the network
interfaces in the system and bind to all of them.
Notice that we already had "localhost" as an alias to bind to both
v4 and v6 loopback interfaces.
This new feature depends on optional dependency QtNetwork.
Now everyone auto-connects to localhost unless passed the
option --connect=
Also make indexer find the logs.conf from the same dir as the
commandline passed config file.
This makes running it as a service more useful.
Also upgrade the cashier app with logging, ctrl-c catching
and debug + version command line arguments.
Last, this checks the server version and exits if the Hub
version is too old.
The main goal of this is to make sure that network services
implementations don't reuse one bufferpool for all their remotes as that
can cause threading issues.
One bufferpool per remote is now made easy.
Handle incoming payments, show if under/overpaid and
make sure everything is properly inserted into the database.
This makes the process actually work and useful for a small business
So the service only noticed new stuff happening, like a transaction
coming in or block being mined.
With this change we get a little smarter and look in the current mempool
as well to try and match a transaction.
This should be very useful for clients that lose network connection
briefly.
Get rid of the weird boost signals setup
Move it to a new library 'interfaces' which is
for stuff that has no dependencies and can avoid
creating inter-library or cicular dependencies.