Commit graph

7 commits

Author SHA1 Message Date
MarcoFalke
fa87da2f17
qa: Avoid start/stop of the network thread mid-test 2018-06-25 14:06:41 -04:00
Gregory Sanders
86edf4a2a5 expose CBlockIndex::nTx in getblock(header) 2018-06-13 10:20:50 -04:00
Wladimir J. van der Laan
947c25ead2
Merge #12431: Only call NotifyBlockTip when chainActive changes
f98b54352 Only call NotifyBlockTip when the active chain changes (James O'Beirne)
152b7fb25 [tests] Add a (failing) test for waitforblockheight (James O'Beirne)

Pull request description:

  This is a subset of the more controversial https://github.com/bitcoin/bitcoin/pull/12407, but this also adds a test demonstrating the bug.

  In InvalidateBlock, we're calling NotifyBlockTip with the now-invalid block's prev regardless of what chain the ancestor block is on. This could create numerous issues, but it at least screws up `waitforblockheight` (or anything else relying on `rpc/blockchain.cpp:latestblock`) when InvalidateBlock is called on a block not in chainActive, which can happen via RPC.

  Only call NotifyBlockTip when the block being marked invalid is on the active chain.

Tree-SHA512: 9a54fe5e8c7eb489daf5df4483c0986129e871e2ca931a456ba869ecb5d5a8d4f7bd27ccc9e711e9292c9ed79ddef896c85d0e81fc76883503e327995b0e914f
2018-03-15 17:05:43 +01:00
James O'Beirne
152b7fb25f [tests] Add a (failing) test for waitforblockheight
Demonstrates the presence of a bug in in `validation.cpp:InvalidateBlock`
which will update `rpc/blockchain.cpp:latestblock` erroneously.
2018-02-16 11:50:16 -05:00
João Barbosa
57e6786203 qa: Improve getchaintxstats functional test 2018-02-15 21:43:45 +00:00
John Newbery
7444149de3 Document method for reviewers to verify chainTxData
This commit adds the final block hash of the window to getchaintxstats
and documents how reviewers can verify changes to chainTxData.
2018-02-02 09:29:33 -05:00
Anthony Towns
81b79f2c39 [tests] Rename rpc_* functional tests. 2018-01-25 09:44:29 +10:00
Renamed from test/functional/blockchain.py (Browse further)