Commit Graph

12358 Commits

Author SHA1 Message Date
tomFlowee 63aebe14a1 minor fixlets 2020-12-24 14:15:48 +01:00
tomFlowee f65cae8b0f More code to make static checkers happy 2020-12-24 14:14:22 +01:00
tomFlowee 940871b73e Slight speadups and cleanups
Static analisis of code suggested some const& and found dead code.
2020-12-24 14:13:43 +01:00
tomFlowee 56ea5579f1 BlackboxTest: printing of debug lines
Reuse the feature of TestBasic to make the logger prefix the test
function we are currently in.
2020-12-24 12:54:04 +01:00
tomFlowee afce2134fd Fix include 2020-12-24 12:52:48 +01:00
tomFlowee 0eea8e5231 Add RPC call validateblocktemplate 2020-12-18 15:35:45 +01:00
tomFlowee edc255d308 Fix test
This test hardcoded a date now a couple of days in the past, which
made the test fail.

Set the date to be far in the future.
2020-12-17 10:42:15 +01:00
tomFlowee 51153cbf11 Log improvement
Make sure we log by default about each interface the API listens on.
2020-12-17 09:49:53 +01:00
tomFlowee ba5689a4f4 fix BIP37 processing for non-topologically ordered blocks
Summary:
CMerkleBlock::CMerkleBlock called IsRelevantAndUpdate() on each transaction
in order, which (due to the outpoint-adding feature) assumes a topological
order of transactions in order to work correctly. If an outpoint of
interest were created later in a block than when gets spent, then it would
be added into the bloom filter too late, and thus that spending transaction
would get missed.

This changes CMerkleBlock::CMerkleBlock to scan all outputs first, then
make a second loop to scan all inputs. This requires breaking up the
IsRelevantAndUpdate() function into two parts. The original
IsRelevantAndUpdate() functionality remains fully intact however, as it
gets called from mempool-related code (mempool has topological order) and
tests.

Note that vMatchedTxn.push_back is moved into the second loop so that index
i keeps ascending order, in case that is somehow relevant. (the tests at
least do check this)

A two-loop construction like this will very slightly increase the false
positive rate.

Originally by: Mark Lundeberg
2020-12-17 09:49:15 +01:00
tomFlowee 8e44b058af Add flags getter 2020-12-17 09:08:34 +01:00
tomFlowee ab155e7064 Copy the info here too 2020-12-17 09:07:41 +01:00
tomFlowee 095e69fd01 Add comment to make config easier. 2020-12-16 22:10:36 +01:00
tomFlowee a92f896083 Make enable-wallet build work with boost v75
Same compile fixes as before, now also for builds that compile the
test wallet.
2020-12-16 21:09:58 +01:00
tomFlowee 519b03d93b Some notes 2020-12-16 18:44:31 +01:00
tomFlowee 0bace433e8 Make compile with boost 1.75 2020-12-15 12:54:07 +01:00
tomFlowee df96d887a3 Better log name 2020.08.2 2020-12-07 18:04:32 +01:00
tomFlowee 42bbe20cac Change place to look for logs.conf
First search for the logs.conf in the same dir as the -conf file.
2020-12-07 17:35:41 +01:00
tomFlowee 6195f84068 Print IP since peer-ID is useless before handshake 2020-12-07 17:35:10 +01:00
tomFlowee cd67d2f186 prepare next release 2020.08.1 2020-12-07 12:14:46 +01:00
tomFlowee 3927684c33 Remove unused file 2020-12-06 23:10:12 +01:00
tomFlowee 1d8caed5db various small corrections 2020-12-06 23:09:50 +01:00
TomZ d545bf339b match code 2020-12-06 13:19:21 +01:00
TomZ 9f0a75839a Process static checks warnings 2020-12-06 13:18:08 +01:00
TomZ 0fda43974d Make log line a little more clear 2020-12-06 13:17:24 +01:00
TomZ b0cf4104b1 Merge branch '2020.07' 2020-11-23 14:17:42 +01:00
TomZ d430a4be8a Update all usages of boost create_directories
The API throws when the directories already exist, which is quite
unexpected.
This now changes the code to silently ignore these issues in the
knowledge that the immediately following opening of files will
fail with a nice error message.
2020-11-23 14:09:00 +01:00
TomZ 18a4ca0295 Make txVulcano work on scalenet
I got some UTXOs to test and now got some blocks filled
there, which proves the concept.
Its a bit slow to start (1 -> 20 tx are hardcoded) which was not an
issue if you can call generate() to mine, may be useful to adjust
for scalenet.

Yet, the basis works.
2020-11-22 17:13:53 +01:00
TomZ 1a2349374d Merge branch '2020.07' 2020-11-21 17:15:53 +01:00
TomZ 85cb3c3437 Install bitcore-proxy confs too
Also add some more documentation
2020-11-21 17:14:34 +01:00
TomZ 706be16a8d Make install place the systemd / conf files
This is now also done for the rest-services
2020-11-21 13:58:31 +01:00
TomZ 83d571e121 Do less work for non-gui builds
Don't even try to search for some GUI packages when the setup says we
should not compile the GUI components.

This should make the configure output easier to interpret.
2020-11-21 13:55:53 +01:00
TomZ 91c4f8e75a Try to make txVulcano ready for scalenet 2020-11-21 13:07:57 +01:00
TomZ c868a2a65f Do less work for non-gui builds
Don't even try to search for some GUI packages when the setup says we
should not compile the GUI components.

This should make the configure output easier to interpret.
2020-11-21 13:07:08 +01:00
TomZ 617fc9afb6 Make API clearer: add UserTag1 - 3
Users are allowed to put (almost) anything in the header and we parrot
it back to them, this API makes it clearer which ones are available for
users.
2020-11-21 12:20:05 +01:00
TomZ bdd1609c51 Fix compare-with-self
likely a copy/paste error when I wrote this :)
2020-11-21 10:42:17 +01:00
TomZ 251cc76966 Avoid banning a whitelisted peer on bad headers. 2020-11-18 22:40:46 +01:00
TomZ 27e507cba0 Test and fix reconsiderBlock
This adds a unit test to see if the combination of invalidateBlock and
reconsiderBlock do what we expect to do.

The main issue was that we store an invalidated block in the UTXO and we
forgot to re-validate that on reconsider.

Additionally I avoid writing a lot of unchanged data to the block-index.
2020-11-18 22:08:00 +01:00
TomZ 700c2b59d6 Make controlling blockchain not hidden.
This stops hiding the reconsiderblock and invalidateblock RPC calls.
2020-11-18 16:40:11 +01:00
TomZ d2959dc4c1 Be smarter on reconsiderblock for headers 2020-11-17 23:40:29 +01:00
TomZ 6f2584f14d Fix off-by-one
The test was on the pprev, so we need a +1
2020.07.2
2020-11-17 23:11:05 +01:00
TomZ bac18862c5 Add build dependency for testing 2020-11-17 21:46:39 +01:00
TomZ 262706cf8e Make loading faulty data more robust
Instead of an assert when we encouter faulty data this moves the error
up the stack and allows for rollback.
2020-11-17 20:59:11 +01:00
TomZ 477a536e25 [UTXO] UnitTest rollback-to-checkpoint code 2020-11-17 20:57:32 +01:00
TomZ 089145a3a6 Delete copy constructor 2020-11-17 16:04:45 +01:00
TomZ 2df30ac774 Make a new release 2020-11-17 00:00:25 +01:00
TomZ 3343b7a2b2 Share binding code with bitcore-proxy
Additionally, support optional port argument.
2020-11-16 23:09:17 +01:00
TomZ 960e3afeb2 Redo binding logic in all Qt
Avoid conversion to and from boost and this solves the issue of trying
to listen to multiple interfaces not working very well.
2020-11-16 22:45:46 +01:00
TomZ b257ac62b3 Due to popular demand: bind on all interfaces
When there is no config we now bind on all available (at startup)
interfaces to listen for service requests.

This solves the problem where a fresh server would not listen to
requests from the outside world but only on localhost.
2020-11-16 19:44:24 +01:00
TomZ bdcf8ad45c Show version in the start message
This is used by various apps, like indexer. They will now display
something like:

Flowee indexer starting. Version: 2020-7.0 (v1)
2020-11-16 18:59:25 +01:00
TomZ 86e514fc9b update version 2020-11-16 16:47:51 +01:00