Transactions can have token information before the output-script,
as such we add the filter and only go for the data we actually want.
This code is written by Telegram user @John_Galts_Gulch.
To make the finding of flowee.conf and logs.conf a tad more predictable
and not random-seeming, this method is re-designed to have a clearly
defined set of fallbacks.
Our database uses memmapping and each blk file allocates a file-
descriptor (FD). As such we should increase the number at the start of
the app, if we can.
Notice that the 2000 is chosen to work with a full node that still uses
tiny blk files (128 typically) instead of 1GB files as the Hub makes by
default.
Also fix a bug in the handing code. Using the hardcoded default
FD_SETSIZE made no sense there..
If for some reason there are a massive amount of orphaned headers, we
don't just keep them around until they are resolved as that is
detrimental to the operation of the node.
Special case this for a reindex and simply skip all orphans fur the
duration.
Doing a -reindex on a datadir of a different client gives us thousands
of small blk files, which may result in us hitting the max simultaneous
open files limit.
This change forces us to flush the list a bit more aggressively and
close open files.
As we moved most of the creation of a BufferPool to be via the
Streaming::pool() method, which uses a thread-local, it makes sense
to start cleaning up the design and make it more modern C++.
The above mentioned method would return a reference and you'd see
loads of places use `auto &pool =` which is less than ideal.
As the number of places where we actually instantiate a BufferPool
goes down, the usage of some sort of smart pointer makes more sense.
This now makes all APIs use BufferPool be wrapped in a shared_ptr.
This follows the coding style guideline that the file that contains a
class should follow the exact name of this (main) class.
key.{h|cpp} -> PrivateKey.{h|cpp}
This follows the coding style guideline that the file that contains a
class should follow the exact name of this (main) class.
pubkey.{h|cpp} -> PublicKey.{h|cpp}
pubkey_utils.{h|cpp} -> PublicKeyUtils.{h|cpp}
To enable this means the buildsystem will build all the applications
as well as the libraries.
Applications are 'hub' / 'txVulcano' / 'indexer' etc.
Default this one is turned off.
The leveldb and univalue 3rd party libraries are not installed and
not needed by anyone outside of the Hub.
So move them there, making it easier for 3rd party usage.
Version.h held mostly stuff for protocol.h, which is a hub-specific file.
The only thing that we actually use is the PROTOCOL_VERSION in our code
and as such that one moved to the interfaces dir.
setting an incorrect value should not keep the old data after we already
update the fValid boolean.
That would give the user the impression that the data was removed while
it really isn't.
These are technically static libs, but not in any way shared libs.
They are used solely only by this repo and really only by the hub.
Most important, no header files are installed and basically none of
the normal rules for reusable libraries are applied to these files.
This introduces several options for public node operators to limit their
nodes usage by 3rd parties, this is aimed at usage of resource-hungry
areas.
We allow limiting the amount of connections any single IP can keep open
with us.
We limit the amount of reconnects we allow in a short number of seconds.
We allow limiting the number of addresses (or scriptHashes) a peer can
register for the node to scan.
The last one is for both the addressMonitorService as well as for the
getBlock filters.
For node operators these items become available using command line
options or config-file options. By default these limits are unlimited as
we assume default usage to be private.
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.
Move some globals and all stuff pulling in crypto to the
server/serverutil.cpp file
Remove dead code.
Move several items that were used in only one place to the respective
files using them.
Move the class WaitUntilFinishedHelper into its own file.
Made sure no header includes utils.h
remove a handfull of files including utils.h for nothing.
Should a user point to a config file with the option `-conf` then
we will read the testnet/regtest options from that file.
This does not change the old behavior. To be clear;
Should a user pass -regtest on the commandline (and not -conf) then
we will only read the config file from the regtest subdir
(~/.config/flowee/regtest).