Commit Graph

12331 Commits

Author SHA1 Message Date
tomFlowee b12e846c92 whitespace, make pretty 2021-01-20 19:14:53 +01:00
tomFlowee 5b7fa33573 Add an extra assert.
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.
2021-01-20 18:23:59 +01:00
tomFlowee 30e28acdd5 Remove unused code.
Move the MutableTransactionSignatureChecker class out of the header and
thereby remove the need to include transaction.h in the header.

This checker was never used in any app, just in the unit tests.

This also fixes includes around.
2021-01-20 18:22:34 +01:00
tomFlowee e1d57f91ba Specify copy-construtor and asssignment operators
To be explicit avoids confusion.
2021-01-20 16:00:25 +01:00
tomFlowee b836134081 Fix a source of test instability
Especially seen in the block-validation tests, we sometimes delete
the validation engine while some other threads are still doing stuff
with the not surprising effect that we may cause crashes or asserts
to get hit.

This change makes us wait instead.
2021-01-20 15:59:45 +01:00
tomFlowee 1b448e98f1 Be aware of the quiet zone
QR Codes have to have a Quiet zone according to spec, this adds that
zone to the image.
2021-01-19 18:59:54 +01:00
tomFlowee 7647dde2b5 Handle DNS feeds better.
Avoid issues when the DNS is slow.
Increase the score of an IP that is part of a feed.
2021-01-13 18:15:33 +01:00
tomFlowee 1d8ea2a294 Add a testnet4 seeder. 2021-01-13 12:00:32 +01:00
tomFlowee c5fca38956 Check basedir or throw
This makes the download manager fail fast, with appropriate logging, on
misconfiguration.
2021-01-13 12:00:15 +01:00
tomFlowee 371a9c5151 Remove unused type 2021-01-13 11:39:38 +01:00
tomFlowee 20da158341 Avoid compile issues in some cases 2021-01-12 17:30:20 +01:00
tomFlowee 2a330fd0a9 Don't limit restarts 2021-01-12 17:29:52 +01:00
tomFlowee 2ed836a71d Support buffers for strings too 2021-01-06 23:16:19 +01:00
tomFlowee 407dd2f2ab Simplify messageparser.
Remove some unused methods and complexity.
2021-01-06 19:37:27 +01:00
tomFlowee 6a92cbf695 Add easier way to set the id on a base58 data. 2021-01-05 22:38:57 +01:00
tomFlowee 3fe98afce9 Minor cleanup
This removes some unused includes from common headers and dead code
from some C++ files.
2021-01-05 22:05:25 +01:00
tomFlowee 094ce6907d Clarify code: avoid non-trivial macros 2021-01-05 21:29:44 +01:00
tomFlowee 2f26329eb9 Add some API docs 2021-01-05 21:29:14 +01:00
tomFlowee 9748d3988f Cleanups and improvements. 2020-12-25 23:51:06 +01:00
tomFlowee e89e3fe8ac Add license text
All sources should have a license text at the top of each file
2020-12-25 23:45:03 +01:00
tomFlowee 3299795fc2 Add test for GetMempoolInfo 2020-12-24 22:45:21 +01:00
tomFlowee 12c3defd0d Merge MR 19 of gitlab.com:FloweeTheHub/thehub 2020-12-24 22:44:23 +01:00
Justaphf 517db921f9 Add getmempoolinfo RPC wrapper to API 2020-12-24 09:57:30 -05:00
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