Commit graph

28 commits

Author SHA1 Message Date
Calin Culianu
9b08a52930
fixed a typo 2019-12-29 00:47:29 +02:00
Calin Culianu
7b4514b412
Made poll interval be 2 seconds
Also got rid of some of the debug log spam for GetChainInfoTask and
SynchMempoolTask -- they only print stuff if new stuff is found.

misc other nits.
2019-12-29 00:45:09 +02:00
Calin Culianu
a831cce8ac
Modified license preamble to say "Bitcoin Cash" instead of "Electron Cash"
The hope is maybe people will adopt this with other wallets...
2019-12-28 23:48:24 +02:00
Calin Culianu
405335c173
Added LICENSE preamble to all top-level source files
GPL v3. YAY!
2019-12-28 23:46:05 +02:00
Calin Culianu
b799dfb2a8
Scripthash history fix. Oops!
we weren't adding the right txidx to the history.  Good thing I also
added debug code to this commit to check history.

Fixed!

Also various other nits and tweaks.  Added the /debug endpoint for
sending params for debugging to the server.
2019-12-12 12:15:06 +02:00
Calin Culianu
b411fb13ca fix to stats timeout -- print error 2019-12-09 15:57:26 +02:00
Calin Culianu
6df916565a
Made app only start listening for client connections after initial sync
Also in this commit various nits and subtle bugs prevented.

Refactored the 'Stats' mechanism to return a generic QVariant rather
than QVariantMap, which is more flexible.

Misc. other nits.
2019-11-27 14:07:09 +02:00
Calin Culianu
0eb50606b9
Added "CtlTask" mechanism to Controller class, plus nits & refactoring
This is more complex than what we had before -- but is more concurrent
and is more production-ready -- it can deal with failures better and now
we also poll bitcoind for new headers.

Still probably can be optimized somehwat -- but getting there!
2019-11-25 22:34:11 +02:00
Calin Culianu
4d80d21276
nits 2019-11-17 12:04:12 +02:00
Calin Culianu
e9a6479ac9
nits 2019-11-17 11:38:28 +02:00
Calin Culianu
339d7aebc7
Nits 2019-11-17 10:44:19 +02:00
Calin Culianu
3c52e988dd
Fixed the dreaded virtual QObject *qobj() thing we had in this codebase
Finally, after 20 years, I figured out how to do this.  Diamond-patter
multiple inheritence is tricky. Downcasting from a Base to a Derived
must be unambiguous, for one (thus you need virtual when inheriting the
base).

Secondly -- it must all be public all the way down to the concrete
class!

This is subtle.  I suppose the Base cannot see the Derived class
inherits it per C++ rules if not publicly inherited.  TIL.

https://en.cppreference.com/w/cpp/language/dynamic_cast#Explanation
2019-11-17 10:31:40 +02:00
Calin Culianu
ca9db3fc8d
Refactored stats stuff into a mixin class, StatsMixin
This makes it so that subobjects that return stats get the "statsSafe()"
function for free (which does a Util::LambdaOnObject).
2019-11-17 00:18:44 +02:00
Calin Culianu
dc8d95ee69
Refactoring; made all AbstractConnection inherit TimersByNameMixin
Also wrote a virtual methd 'getStats()' for AbstractConnection which
puts some basic stats into a QVariantMap for the /stats endpoint.

Subclasses can call the base implementation and add their own stats to
the returned map.

Also in this commit: misc refactoring and nits
2019-11-16 22:28:27 +02:00
Calin Culianu
7d1ee5d6de
Finally got to the bottom of the "didn't call on_finished" bug
Basically it's not called on app exit. We made it so it's not so crucial
it be called for cleanup.

Also added some preliminary stats to the http /stats endpoint for the
BitcoinD instances.
2019-11-13 00:57:20 +02:00
Calin Culianu
9bb01819b2
nits 2019-11-12 23:30:06 +02:00
Calin Culianu
d59e1ff078
nits 2019-11-12 23:19:46 +02:00
Calin Culianu
a34585da1b
Added BitcoinD classes.. lord help me.
Also "upgraded" the universal ID we use for all objects to use quint64
(unsigned) rather than signed, and the "NO_ID" is 0.
2019-11-12 22:14:04 +02:00
Calin Culianu
7c5cfb8993
More nits and cleanup.
I'm getting a little OCD here..  but it's good. :)
2019-11-12 11:29:45 +02:00
Calin Culianu
5475548c4a
nits 2019-11-12 01:13:50 +02:00
Calin Culianu
43b7e915c4
Got rid of more ShuffleUp stuff, added CLI args 2019-11-07 23:55:13 +02:00
Calin Culianu
01d8d01ccd Added stats HTTP server. Also refactored TcpServer 2019-05-09 02:12:58 +03:00
Calin Culianu
212eb1169b Implemented onNewBlockHeight
- We check the address unspent cache and do cache upkeep
- Various other nits and corner cases handled in this commit
2019-05-05 12:45:26 +03:00
Calin Culianu
0da480f3c5 Got Controller and EXMgr to use the TimersByNameMixin
This mixin should be useful as we move forward
2019-05-05 01:03:23 +03:00
Calin Culianu
76a9711837 added a TimersByNameMixin class 2019-05-05 00:10:02 +03:00
Calin Culianu
24b8e992b5 initial schema impl 2019-04-29 10:01:58 +03:00
Calin Culianu
bc8144ea84 Refactorings continue...
TcpServer now uses the ThreadObjectMixin.. yay.

Plus misc other cleanup.

Now I can implement the client..
2019-04-28 11:59:14 +03:00
Calin Culianu
dd7fdcc9e0 Added IdMixin mixin 2019-04-28 11:06:50 +03:00
Renamed from ThreadObjectMixin.cpp (Browse further)