Commit Graph

931 Commits

Author SHA1 Message Date
TomZ 50fc8dd024 Make available some helper methods as protected 2019-12-27 21:31:44 +01:00
TomZ 92fabcac85 Merge branch '2019.10' 2019-12-23 13:24:27 +01:00
TomZ d15998e658 Provide a safe way to modify jobs out-of-thread
The FloweeJS component uses this class but requires the usage
of the NodeJS 'main' thread. Which needs safe access to the jobs
list at the same time the Flowee workers need access.
Simple solution; add a mutex.
2019-12-23 13:20:08 +01:00
TomZ aef124e523 Merge branch '2019.10' 2019-12-17 17:58:34 +01:00
TomZ 1143a71a92 Fix assignment typo 2019-12-17 17:57:08 +01:00
TomZ f4d8870001 NWM: tweaks to logs. 2019-12-17 17:36:15 +01:00
TomZ 6e8c0b29f7 Also here, report minor ver as hex.
Also fix some compiler warnings
2019-12-12 17:48:48 +01:00
TomZ 95646682b3 Use hex for the client minor number.
This makes string comparisons much easier (a > 9, while 10 < 9).
2019-12-12 17:34:14 +01:00
TomZ 8c842fa108 Catch exceptions on usage of socket
This should fix the issue where the NWM stopped listening due to us not
calling the proper setupCallback()

Also add some logging.
2019-12-11 23:47:21 +01:00
TomZ ea1ab3c987 Fix interpreting API results. 2019-12-10 17:39:17 +01:00
TomZ 7a360f5a3d slight logging updates 2019-12-09 15:15:52 +01:00
TomZ 85d5dac081 add is{Hub|Indexer}Connected() methods. 2019-12-09 15:13:37 +01:00
TomZ ad65d8010b Fix check for coinbase in search API. 2019-12-09 15:13:37 +01:00
TomZ 0e02f9796d cleanup 2019-12-09 15:13:37 +01:00
TomZ 78fa7fc627 add new virtuals for floweejs 2019-12-01 23:05:33 +01:00
TomZ e070acec39 Update checkpoints. 2019-12-01 21:33:18 +01:00
TomZ 1e04e01983 Make big reorgs work better (mostly testnet) 2019-12-01 21:04:43 +01:00
TomZ d988400be6 fix typo 2019-12-01 21:04:24 +01:00
TomZ 88cb02617a Merge branch '2019.09' 2019-12-01 15:12:44 +01:00
TomZ 63294beed5 Fix deadlock on calling chain::FindFork 2019-12-01 15:11:05 +01:00
TomZ ac85f525f3 Lower debug level of 'tx validation failed' message. 2019-12-01 14:49:38 +01:00
TomZ d004e0f5b1 Update UTXO search callback
Make the UTXO search callback actually useful for more than tests.

This passes all the data we have and what the user could want to use,
also updating the receiver (bitcore-proxy).
2019-11-30 19:53:12 +01:00
TomZ f2191ad380 Make UTXO lookup report also the outindex
We have that info, it should be send.
2019-11-30 18:56:25 +01:00
TomZ d658189a73 Move callback
Make the callback happen after we get the indexer status.

Additionally, fix the issue where looking up a txid that failed
would end up being recursive due to us copying the initially requested
hash. Causing it to be a duplicate (which then fails etc).
2019-11-29 22:14:51 +01:00
TomZ 152efb2c5d Print more details on making NWM connection. 2019-11-29 20:09:28 +01:00
TomZ a471d919eb Improve logging of not-acceptable connections
Log IP of remote that tries to talk to us but doesn't know the protocol.
2019-11-29 10:59:58 +01:00
TomZ e8c38f6b77 Add api docs 2019-11-28 23:59:32 +01:00
TomZ 42aaf08e6b Fixlet in comments grammar. 2019-11-25 23:23:00 +01:00
TomZ c094c8d523 Merge branch '2019.09' 2019-11-22 19:24:13 +01:00
TomZ abdefac590 Fix handling a tx spending an out-of-range output
Those should not be stored in the orphan cache, as the data is just
wrong. Not missing.
So also punish the sender, it won't ever be valid.
2019-11-22 19:23:57 +01:00
TomZ 79437d227e Avoid forwarding transactions twice.
An INV in some cases could lead us to reply with two transactions
instead of one.
2019-11-22 19:14:32 +01:00
TomZ 69ea2ddfcd Make whitelisted peers not get punished for bad transactions. 2019-11-22 18:58:58 +01:00
TomZ d86c5a837f Make orphancache follow coding style-guide.
member methods start with a lowercase character.
2019-11-21 20:03:26 +01:00
TomZ c1671c707e Merge branch '2019.09' 2019-11-15 21:07:25 +01:00
TomZ adec1ef3b2 Make rpc-cookie reuse existing cookie files.
This allows external software to create it and manage the cookie which
is useful in a cloud setting.
2019-11-15 19:15:22 +01:00
TomZ f77589b7d3 Whitespace and minor issues. 2019-11-15 18:59:55 +01:00
TomZ 9d77814cc0 cleanups and splits
The recent introduction of helper methods on pubkey.h had the
side-effect of pulling in crypto libraries.
This splits the static methods into a separate namespace and file
to avoid such cross-module dependencies.
2019-11-13 19:09:24 +01:00
TomZ 175096b2bd Refactor: move files
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.
2019-11-13 19:09:24 +01:00
TomZ bcec400e79 Remove Qt dependency from the blockchain search stuff. 2019-11-13 19:09:16 +01:00
TomZ d573e307c3 Refactor; move SplitHostPort to utilstrencodings 2019-11-12 15:35:54 +01:00
TomZ 6770467a06 Change the callback to have the version included 2019-11-11 19:37:15 +01:00
TomZ 3b5491e9d3 Fixlets in log-levels for the bitcore proxy. 2019-11-11 19:37:01 +01:00
TomZ a645f963dc Make node ignore tx-invs during IBD/catch-up
This now also works when using '-connect' or other ways to whitelist a
node.
2019-11-06 23:43:13 +01:00
TomZ 917a5babe3 Give nodes 1 point of damage here
This is mostly nodes not following the same chain, doesn't make sense to
keep those around.
2019-11-06 23:43:13 +01:00
TomZ e7ad998d57 Add -fPIC to installed libs 2019-11-04 14:20:50 +01:00
TomZ c1c3d7bd25 Reviewed the API for BlockChain service more.
This finishes the refactor and review and making it much
more future proof by adding gaps in the numbers for extensibility.
2019-10-21 13:55:30 +02:00
TomZ 79e4974d19 Port API getblock::filter to use script-hash
The API call for GetBlock has a filter-on-address functionality which is
now ported to no longer use ripe160 addresses but instead uses output-
script hashes.
This avoids problems for transactions not using p2pkh and generally is a
cleaner solution.

This also adds a unit test to test this feature.
2019-10-20 22:12:09 +02:00
TomZ f1d0a68579 Port address monitor service to use address-hash
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.
2019-10-20 20:17:17 +02:00
TomZ e6df5a8e06 Fix running API test in a dev-test-build
This initializes the hubs random when built using unsafe crypto.
Typically only used when the dev wants to run it in tools like valgrind.
2019-10-20 19:17:18 +02:00
TomZ 2396938cfb New version and only connect to new versions 2019-10-20 11:57:01 +02:00