Commit graph

10 commits

Author SHA1 Message Date
Calin Culianu
7e16244609
Nits: Runtime check that classes deriving from QObjectMixin are ok.
added some asserts, plus -DNDEBUG to release build to disable asserts
for release.
2019-11-17 10:59:50 +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
7b77967376
nits 2019-11-16 23:43:36 +02:00
Calin Culianu
c0ad6ebefe
more C++ template wizardry 2019-11-12 04:37:34 +02:00
Calin Culianu
46c569ff97 some c++ wizardry to try out packaged_task and futures 2019-11-12 03:04:49 +02:00
Calin Culianu
45daaf6e91
some nits 2019-11-09 21:14:07 +02:00
Calin Culianu
43b7e915c4
Got rid of more ShuffleUp stuff, added CLI args 2019-11-07 23:55:13 +02: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
3f49dce1db Added some small goodies
- Util::RunInThread to run a lambda in a thread
- App exit handling cleanup
- EXMgr uses an id for clients now
- EXMgr keeps track of lagging clients
- EXMgr more aggressive with reconnects if no valid exclients
- Nits and refactorings and misc. cleanup
2019-04-27 12:38:50 +03:00