diff options
| author | Jesse Cohen <[email protected]> | 2018-04-18 08:01:48 -0400 |
|---|---|---|
| committer | Jesse Cohen <[email protected]> | 2018-05-16 08:28:15 -0400 |
| commit | dd435ad40267f5c50ff17533c696f9302829a6a6 (patch) | |
| tree | 771a3f789f30646df1d0a067b71db619296af144 /src/test/test_bitcoin.cpp | |
| parent | Fix concurrency-related bugs in ActivateBestChain (diff) | |
| download | discoin-dd435ad40267f5c50ff17533c696f9302829a6a6.tar.xz discoin-dd435ad40267f5c50ff17533c696f9302829a6a6.zip | |
Add unit tests for signals generated by ProcessNewBlock()
After a recent bug discovered in callback ordering in MainSignals,
this test checks invariants in ordering of
BlockConnected / BlockDisconnected / UpdatedChainTip signals
Diffstat (limited to 'src/test/test_bitcoin.cpp')
| -rw-r--r-- | src/test/test_bitcoin.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index b72df1604..77d43890e 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -38,6 +38,12 @@ FastRandomContext insecure_rand_ctx(insecure_rand_seed); extern bool fPrintToConsole; extern void noui_connect(); +std::ostream& operator<<(std::ostream& os, const uint256& num) +{ + os << num.ToString(); + return os; +} + BasicTestingSetup::BasicTestingSetup(const std::string& chainName) { SHA256AutoDetect(); |