Commit Graph

28 Commits

Author SHA1 Message Date
Jorge Timón 1c897fc3da
Missing includes 2017-04-13 02:31:44 +02:00
Matt Corallo acad82f375 Add override to functions using CValidationInterface methods 2017-04-07 11:53:43 +02:00
Matt Corallo 461e49fee2 SyncTransaction->TxAddedToMempool/BlockConnected/Disconnected
This simplifies fixing the wallet-returns-stale-info issue as we
can now hold cs_wallet across an entire block instead of only
per-tx (though we only actually do so in the next commit).

This change also removes the NOT_IN_BLOCK constant in favor of only
passing the CBlockIndex* parameter to SyncTransactions when a new
block is being connected, instead of also when a block is being
disconnected.

This change adds a parameter to BlockConnectedDisconnected which
lists the transactions which were removed from mempool due to
confliction as a result of this operation. While its somewhat of a
shame to make block-validation-logic generate a list of mempool
changes to be included in its generated callbacks, fixing this isnt
too hard.

Further in this change-set, CValidationInterface starts listening
to mempool directly, placing it in the middle and giving it a bit
of logic to know how to route notifications from block-validation,
mempool, etc (though not listening for conflicted-removals yet).
2017-04-07 11:53:43 +02:00
Matt Corallo f5e9a019a4 Include missing #include in zmqnotificationinterface.h 2017-04-07 11:52:38 +02:00
Gregory Maxwell 6b3bb3d9ba Change LogAcceptCategory to use uint32_t rather than sets of strings.
This changes the logging categories to boolean flags instead of strings.

This simplifies the acceptance testing by avoiding accessing a scoped
 static thread local pointer to a thread local set of strings.  It
 eliminates the only use of boost::thread_specific_ptr outside of
 lockorder debugging.

This change allows log entries to be directed to multiple categories
 and makes it easy to change the logging flags at runtime (e.g. via
 an RPC, though that isn't done by this commit.)

It also eliminates the fDebug global.

Configuration of unknown logging categories now produces a warning.
2017-04-01 18:53:29 +00:00
Karl-Johan Alm 5ba61f0034
[zmq] Call va_end() on va_start()ed args. 2017-03-22 12:56:44 -07:00
isle2983 27765b6403 Increment MIT Licence copyright header year on files modified in 2016
Edited via:

$ contrib/devtools/copyright_header.py update .
2016-12-31 11:01:21 -07:00
Matt Corallo 71fde5563b Get rid of mapArgs direct access in ZMQ construction 2016-12-24 11:10:39 -05:00
instagibbs 412bab22b2 Adapt ZMQ/rest serialization to take rpcserialversion arg 2016-12-05 07:43:22 -05:00
Matt Corallo 76faa3cdfe Rename the remaining main.{h,cpp} to validation.{h,cpp} 2016-12-02 09:42:51 -08:00
Matt Corallo e736772c56 Move network-msg-processing code out of main to its own file 2016-12-02 09:42:51 -08:00
Matt Corallo 12ee1fe018 Always call UpdatedBlockTip, even if blocks were only disconnected 2016-10-04 13:52:57 -04:00
Matt Corallo 87e7d72807 Make validationinterface.UpdatedBlockTip more verbose
In anticipation of making all the callbacks out of block processing
flow through it. Note that vHashes will always have something in it
since pindexFork != pindexNewTip.
2016-10-04 12:35:07 -04:00
Wladimir J. van der Laan a5bb6387f7
Merge #8607: [doc] Fix doxygen off-by-one comments, fix typos
fafe7b3 contrib: Make fix-copyright-headers.py more portable (MarcoFalke)
fa27c0a [doc] Fix typos in comments, doxygen: Fix comment syntax (MarcoFalke)
fabfd5d [qa] pull-tester: Don't mute zmq ImportError (MarcoFalke)
67a5502 init: Fix typo in help message for -whitelistforcerelay (Wladimir J. van der Laan)
2016-08-28 16:06:03 +02:00
MarcoFalke fa27c0a2c4 [doc] Fix typos in comments, doxygen: Fix comment syntax 2016-08-22 10:51:41 +02:00
Jonas Schnelli b3b3c2a562
Reduce cs_main locks during ConnectTip/SyncWithWallets 2016-08-12 14:53:10 +02:00
Jonas Schnelli 0b25a9fb42
[ZMQ] append a message sequence number to every ZMQ notification 2016-04-19 15:32:11 +02:00
Jonas Schnelli de821d56e1
[ZMQ] refactor message string 2016-04-15 13:23:16 +02:00
mrbandrews 0040118959 Fixes ZMQ startup with bad arguments. 2016-02-29 13:34:09 -05:00
Wladimir J. van der Laan d2228384de
Merge #6480: include the chaintip blockindex in the SyncTransaction signal, add signal UpdateTip()
7d0bf0b include the chaintip *blockIndex in the SyncTransaction signal (Jonas Schnelli)
2016-02-04 17:03:09 +01:00
MarcoFalke fa7e4c0919 Bump copyright headers to 2014 2016-01-05 21:01:39 +01:00
Jonas Schnelli 7d0bf0bb46
include the chaintip *blockIndex in the SyncTransaction signal
- allows reducing of calls to main.cpp for getting the chaintip during transaction syncing
- potentially allows reducing of cs_main locks
2015-12-04 09:18:53 +01:00
Daniel Cousens ffacd27def zmq: prepend zmq to debug messages 2015-11-19 13:32:14 +11:00
Wladimir J. van der Laan 77beab70de
Merge pull request #6163
87cbdb8 Globals: Explicit Consensus::Params arg for main: (Jorge Timón)
2015-11-10 15:32:03 +01:00
João Barbosa de0499d3b8 Fix ZMQ Notification initialization and shutdown
Moves the call Initialize() from init.cpp to CreateWithArguments() and handles the
return value. Moves the call Shutdown() from init.cpp to destructor.
Changes Initialize() and Shutdown() to protected members.
2015-11-04 10:36:00 +00:00
Jorge Timón 87cbdb8b41 Globals: Explicit Consensus::Params arg for main:
-CheckBlockIndex
-DisconnectTip
-GetTransaction
-InvalidateBlock
-ProcessGetData
-ReadBlockFromDisk
2015-10-30 14:07:30 +01:00
Jonas Schnelli d76a8acb9b use CBlockIndex* insted of uint256 for UpdatedBlockTip signal
- removes mapBlockIndex find operation
- theoretically allows removing the cs_main lock during zqm notification while introducing a new file position lock
2015-09-16 16:51:21 +02:00
Jeff Garzik e6a14b64d6 Add ZeroMQ support. Notify blocks and transactions via ZeroMQ
Continues Johnathan Corgan's work.
Publishing multipart messages

Bugfix: Add missing zmq header includes

Bugfix: Adjust build system to link ZeroMQ code for Qt binaries
2015-09-16 11:01:35 +01:00