b4e4ba4 Introduce convenience type CTransactionRef (Pieter Wuille)
1662b43 Make CBlock::vtx a vector of shared_ptr<CTransaction> (Pieter Wuille)
da60506 Add deserializing constructors to CTransaction and CMutableTransaction (Pieter Wuille)
0e85204 Add serialization for unique_ptr and shared_ptr (Pieter Wuille)
- Do sorting for date, amount and confirmations column as longlong, not
unsigned longlong.
- Use `UserRole` to store our own data. This makes it treated as
ancillary data prevents it from being displayed.
- Get rid of `getMappedColumn` `strPad` - these are no longer necessary.
- Get rid of hidden `_INT64` columns.
- Start enumeration from 0 (otherwise values are undefined).
In 0.13 orphan transactions began being treated as implicit
INVs for their parents. But the resulting getdata were
not getting the witness flag.
This fixes issue #9182 reported by chjj and roasbeef on IRC.
Make a copy of the boost time-point to wait for, otherwise the head of
the queue may be deleted by another thread while this one is waiting,
while the boost function still has a reference to it.
Although this problem is in non-test code, this is not an actual problem
outside of the tests because we use the thread scheduler with only one
service thread, so there will never be threads fighting at the head of
the queue.
The old boost fallback escapes this problem because it passes a scalar
value to wait_until instead of a const object reference.
Found by running the tests in LLVM-4.0-master asan.
This further decouples "main" and "net" processing logic by moving
orphan processing out of the chain-connecting cs_main lock and
into its own cs_main lock, beside all of the other chain callbacks.
Once further decoupling of net and main processing logic occurs,
orphan handing should move to its own lock, out of cs_main.
Note that this will introduce a race if there are any cases where
we assume the orphan map to be consistent with the current chain
tip, however I am confident there is no such case (ATMP will fail
without DoS score in all such cases).
ae22357 Replace CValidationState param in ProcessNewBlock with BlockChecked (Matt Corallo)
7c98ce5 Remove pfrom parameter from ProcessNewBlock (Matt Corallo)
e2e069d Revert "RPC: Give more details when "generate" fails" (Matt Corallo)
OBJCXX's std flags don't get defined by our cxx macro. Rather than hard-coding
to c++11, just force OBJCXX to be the same as CXX unless the user specified
otherwise.
Change check_announcement_of_new_block() to wait specifically for the
announcement of the newly created block, instead of waiting for any
announcement at all. A difficult to reproduce failure in
check_announcement_of_new_block() that happened in a travis build
(https://travis-ci.org/bitcoin/bitcoin/jobs/175198367) might have happened
because an older announcement was mistaken for the expected one. The error
looked like:
Assertion failed: Failed
File ".../bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 145, in main
self.run_test()
File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 787, in run_test
self.test_sendcmpct(self.nodes[1], self.segwit_node, 2, old_node=self.old_node)
File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 201, in test_sendcmpct
check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is None and p.last_inv is not None)
File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 194, in check_announcement_of_new_block
assert(predicate(peer))
This commit also changes the assertion failed message above to include more
detailed information for debug.
Motivation for this change is mainly to make sync_blocks behavior easier to
understand. Behavior is unchanged in the normal case when there are only 2
nodes in the rpc_connections set. When there are more than 2 nodes, the
previous "timeout -= wait" statement wouldn't take into account time spent
waiting for all nodes and as a result could lead to blocking for longer than
the requested timeout.
Instead of syncing to max height returned by the waitforblockheight RPC, sync
to the max height returned by the getblockcount RPC.
This change was suggested by Suhas Daftuar <sdaftuar@chaincode.com>.