Commit Graph

11739 Commits

Author SHA1 Message Date
TomZ 0c97e3261f Cleanup close/disconnect in NWM
Specifically avoid clearing the messages queue when the other side
disconnects.
2019-04-06 12:28:41 +02:00
TomZ ef5dafe6e0 Add private header warnings 2019-04-06 12:28:34 +02:00
TomZ cec1950650 Make connection wait on destructor
Make sure that a NetworkConnection object (which owns the callbacks)
doesn't return from its destructor until the already scheduled callbacks
in another thread have been completed.

This avoids shutdown scenarios where we execute in a deleted
object.
2019-04-06 11:59:49 +02:00
TomZ dfb28874ca Adjust design by inverting hash
Additionally I split the sql data over multiple tables
to avoid a forever-growing one.
2019-04-05 23:11:37 +02:00
TomZ 9846b467e3 Move code and avoid work.
Move the creation of the ping message to the constructor (from the
connection-established method) so we are certain it gets done exactly
once.

Also avoid putting default (invalid) values in the hashmap.
2019-04-04 22:46:39 +02:00
TomZ 69ab1133f6 Remove obsolete addressingtype 2019-04-04 22:46:39 +02:00
TomZ 8759359442 Run unit test on CI 2019-04-04 22:46:38 +02:00
TomZ 5ed3419d9b Add beginnings of the AddressIndexer as well 2019-04-04 22:46:38 +02:00
TomZ 285b27d3b8 Add multiple databases concept to HashStorage 2019-04-04 22:46:38 +02:00
TomZ 88dd81d090 Make find() work properly 2019-04-03 18:55:33 +02:00
TomZ e5d5b9ec91 Merge branch 'master' into addressdb 2019-04-03 18:09:56 +02:00
TomZ 0447d3c9f6 Correctly detect and print finishing of indexer 2019-04-03 16:16:44 +02:00
TomZ 6202d74d62 More branding 2019-04-03 14:58:19 +02:00
TomZ 747d038585 Make nodes that send us a double spend not get banned
Better keep those nodes close.
2019-04-03 14:48:52 +02:00
TomZ 3cb04abf86 Merge branch '2019.02' 2019-04-03 14:33:59 +02:00
TomZ 6db08ef9f8 Also prune the first file 2019-04-03 14:33:56 +02:00
TomZ 1abe8a137a Move the sse4 part to always compile 2019-04-03 14:33:20 +02:00
TomZ 4d54d2aac5 Merge branch '2019.02' 2019-04-02 21:11:26 +02:00
TomZ 307c485321 Merge branch '2019.01' into 2019.02 2019-04-02 21:11:10 +02:00
TomZ ece2ac4a01 [CMake] fix misdetection of CPU features
Upgrade the code to check not just if the compiler supports, but
try the actual system too.

Also add a new cmake option 'reproductable_builds' which, when set
to true, will not include any optimized hashing algorithms.
2019-04-02 21:10:28 +02:00
TomZ 8808fa9bb4 [CMake] fix misdetection of CPU features
Upgrade the code to check not just if the compiler supports, but
try the actual system too.

Also add a new cmake option 'reproductable_builds' which, when set
to true, will not include any optimized hashing algorithms.
2019-04-02 21:02:41 +02:00
TomZ 9e2114b5c8 Make current chain tip() be an atomic
This allows better lock-free access and avoids crashes.
2019-04-02 19:56:36 +02:00
TomZ 40b1df6f50 make compile when wallet is compiled in 2019-04-02 19:12:13 +02:00
TomZ 67d2019434 Have a special exception for UTXO internal errors
This avoids an internal error from failing one block due
to a perceived missing input while the block may be fine
but other issues need looking at (for instance disk errors).
2019-04-02 18:40:56 +02:00
TomZ 3e46c3e7b4 Rename some old code to use the product name 'Hub' 2019-04-02 17:51:07 +02:00
TomZ dc1f721ce5 Rename some old code to use the product name 'Hub' 2019-04-02 17:45:19 +02:00
TomZ 3afd867454 Add binary search to the HashStorage 2019-04-02 12:07:08 +02:00
TomZ 5767012a9b Make second finalize() work 2019-04-01 22:53:39 +02:00
TomZ 836a558bd2 Make hashstorage level 2 work a little 2019-04-01 21:15:24 +02:00
TomZ 4155557c2f Start working on the HashStorage class 2019-04-01 18:34:39 +02:00
TomZ d722bf4290 Move hash helper to more logical place 2019-04-01 15:34:13 +02:00
TomZ 4b7f6c7c86 Minor cleanups of indexer 2019-04-01 13:27:01 +02:00
TomZ 30d6cc9c72 Separate out a new FloweeServerApplication 2019-04-01 13:27:01 +02:00
TomZ 519cd1b6fc Work on stability of the NetworkManager
In extreme cases we might end up going over the bounds of the internal
buffers, as such myConnection.send() may now throw.

I also cleaned up the ping design and made it a bit more strict.
Last I increased the amount of incoming data I can receive in one go,
this will make throughput higher.
2019-04-01 10:57:42 +02:00
TomZ b8757c1da2 Merge branch '2019.02' 2019-04-01 10:57:32 +02:00
TomZ a1a14d644e Cleanup after oneself 2019-04-01 10:57:04 +02:00
TomZ e2c735d6b8 Fix includes 2019-04-01 10:57:04 +02:00
TomZ 5c9373eeac Introduce new app 'indexer' 2019-04-01 10:57:03 +02:00
TomZ 3e3c4859fe minor bugfix
Make sure we count changes correctly (off-by-one)
2019-03-31 19:53:53 +02:00
TomZ c655c02a4c minor bugfixes in the new GetBlock API call 2019-03-31 19:53:53 +02:00
TomZ d56b09fd5f Minor bugfixes
Better debug printing. Print hex array instead of 'text'
Fix possible deleted memory being accessed.
2019-03-31 19:51:26 +02:00
TomZ ab1248cac9 remove double include of cur dir 2019-03-29 21:58:36 +01:00
TomZ 3d33bdad99 [cmake] Cleanup include paths
as the number of applications grows it makes more sense to separate
the 'server' library from the actually reusable libraries.
To recap, the 'server' library is what we started with when importing
all the code from the hub. Slowly we are moving good code out that
is stand-alone and reusable.
2019-03-29 21:52:07 +01:00
TomZ b8d329ef9f Further moves; NetworkEnums and netbase.{cpp|h}
NetworkEnums.h moves from utils to interfaces.
netbase moves from server to utils/
2019-03-29 21:39:08 +01:00
TomZ cae5e02a4d Drop not needed libs from includes dir 2019-03-29 21:07:28 +01:00
TomZ 5939de8ef0 Move API protocol definition to interfaces dir.
It makes no sense to include the API "library" just to use
the header file.
2019-03-29 21:07:28 +01:00
TomZ 428e61e503 make sure master is not seen as 'latest' 2019-03-29 20:50:08 +01:00
TomZ 66023415f3 updates in docs etc 2019-03-29 17:07:32 +01:00
TomZ cc20f80bf8 Update CMAKE warnings 2019-03-29 16:36:00 +01:00
TomZ b46ad6f2bb mark latest branch 2019-03-28 22:37:44 +01:00