Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase bitcore patches to 0.14 #43

Closed
wants to merge 2,783 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
2783 commits
Select commit Hold shift + click to select a range
71148b8
Merge #9596: [bugfix] save feeDelta instead of priorityDelta in DumpM…
sipa Jan 23, 2017
ff25c32
mempool: add notification for added/removed entries
laanwj Mar 26, 2016
4afbde6
Introduce MemPoolConflictRemovalTracker
morcos Dec 16, 2016
094e4b3
Better document usage of SyncTransaction
morcos Dec 16, 2016
be31a2b
[Trivial] Update license year range to 2017
Jan 23, 2017
5086452
Merge #9588: qt: Use nPowTargetSpacing constant
jonasschnelli Jan 24, 2017
4a1dc35
Merge #9371: Notify on removal
laanwj Jan 24, 2017
1ac878a
Merge #9617: [Trivial] Update license year range to 2017
laanwj Jan 24, 2017
ac9a846
[Trivial] fix logging typo in FlushStateToDisk()
jnewbery Jan 24, 2017
b68f898
Merge #9624: [Trivial] fix logging typo in FlushStateToDisk()
jonasschnelli Jan 24, 2017
5be0190
Delete some unused (and broken) functions in CConnman
TheBlueMatt Jan 24, 2017
3c37dc4
Ensure cs_vNodes is held when using the return value from FindNode
TheBlueMatt Jan 24, 2017
29fb311
Increase minimum debug.log size to 10MB after shrink.
morcos Jan 24, 2017
99464bc
net: Consistently use GetTimeMicros() for inactivity checks
sdaftuar Jan 19, 2017
2f10f06
qa: Increase a sync_blocks timeout in pruning.py
sdaftuar Jan 25, 2017
b9d95bd
Fix various minor linearization script issues
Jan 19, 2017
2366180
Do not add to vNodes until fOneShot/fFeeler/fAddNode have been set
TheBlueMatt Jan 24, 2017
f895023
Merge #9628: qa: Increase a sync_blocks timeout in pruning.py
Jan 26, 2017
ae9719a
Refactor GetMinimumFee to give option of providing targetFee
morcos Jan 26, 2017
3f9f962
Merge #9606: net: Consistently use GetTimeMicros() for inactivity checks
laanwj Jan 26, 2017
07421cf
Merge #9613: [wallet] Clarify getbalance help string to explain inter…
laanwj Jan 26, 2017
10dc58a
Merge #9587: Do not shadow local variable named `tx`.
laanwj Jan 26, 2017
5ac6687
Merge #9574: [depends] Fix QT build on OSX
laanwj Jan 26, 2017
fd70211
Merge #9594: Send final alert message to older peers after connecting.
laanwj Jan 26, 2017
9b4d267
Merge #9519: Exclude RBF replacement txs from fee estimation
laanwj Jan 26, 2017
04b8773
[Qt] fix transaction details output-index to reflect vout index
jonasschnelli Jan 26, 2017
e8021ec
Use CWallet::GetMinimumFee in bumpfee
morcos Jan 26, 2017
fab035f
qa: Actually test assertions in pruning.py
Jan 12, 2017
0c0c63f
Introduce WALLET_INCREMENTAL_RELAY_FEE
morcos Jan 23, 2017
4b189c1
Change bumpfee result value from 'oldfee' to 'origfee'.
morcos Jan 23, 2017
b7b48c8
Refactor: Remove using namespace <xxx> from src/*.cpp.
kallewoof Jan 27, 2017
d9e4d1d
Merge #9637: [Qt] fix transaction details output-index to reflect vou…
laanwj Jan 27, 2017
a7ea2f8
Merge #9638: qa: Actually test assertions in pruning.py
laanwj Jan 27, 2017
cc16d99
[trivial] Fix typos in comments
practicalswift Jan 18, 2017
342eb96
build: find qt's renamed helper libs from 5.7
theuni Jan 19, 2017
8efa34f
depends: add a zlib build
theuni Jan 19, 2017
b5f374f
qt: fix build with zlib for target
theuni Jan 27, 2017
95f97f4
Skip RAII event tests if libevent is built without event_set_mem_func…
luke-jr Jan 28, 2017
fa5137c
[doc] Remove unused clang format dev script
Jan 28, 2017
0fea960
Merge #9510: [trivial] Fix typos in comments
Jan 29, 2017
5f62e3e
Fix typos
practicalswift Jan 29, 2017
720b579
Merge #9646: depends: Fix cross build for qt5.7
laanwj Jan 30, 2017
d2c9e4d
Merge #9615: Wallet incremental fee
laanwj Jan 30, 2017
36966a1
Merge #9626: Clean up a few CConnman cs_vNodes/CNode things
laanwj Jan 30, 2017
668de70
Merge #9644: [refactor] Remove using namespace <xxx> from src/
Jan 30, 2017
71fc17f
qt: periodic translations update
laanwj Jan 30, 2017
53ab12d
Merge #9649: [doc] Remove unused clang format dev script
Jan 30, 2017
e99f0d7
Merge #9647: Skip RAII event tests if libevent is built without event…
laanwj Jan 30, 2017
d625b90
wallet: Refactor dummy signature signing for reusability
sdaftuar Jan 26, 2017
178454d
Contrib: Add jtimon pgp keys for commit sigs and future gitian builds
jtimon Jan 31, 2017
d45955f
Net: CConnman: Make some methods const
jtimon Jan 24, 2017
fc7f2ff
Net: Make CNetMsgMaker more const
jtimon Jan 31, 2017
0729102
Net: pass interruptMsgProc as const where possible
jtimon Jan 31, 2017
f626594
rpc: bumpfee: use correct maximum signed tx size for fee calculation
sdaftuar Jan 26, 2017
9522b53
rpc: bumpfee: handle errors more gracefully
sdaftuar Jan 26, 2017
7bfb770
Merge #9640: Bumpfee: bugfixes for error handling and feerate calcula…
laanwj Feb 1, 2017
77bd8c4
Merge #9625: Increase minimum debug.log size to 10MB after shrink.
laanwj Feb 1, 2017
3eba88d
clarify listunspent amount description
instagibbs Feb 1, 2017
3e900ac
Require merge commits merge branches on top of other merge commits
TheBlueMatt Jan 31, 2017
ba94426
Test that pushes to bitcoin/bitcoin are signed per verify-commits
TheBlueMatt Jan 31, 2017
e30d928
Merge #9663: [RPC] clarify listunspent amount description
laanwj Feb 2, 2017
ae972a5
Merge #9580: Fix various minor linearization script issues
laanwj Feb 2, 2017
4e19efb
Merge #9556: Remove redundant semicolons
laanwj Feb 2, 2017
7c93952
Merge #9656: Check verify-commits on pushes to master
laanwj Feb 2, 2017
1c2edd9
Merge #9654: Add jtimon pgp keys for commit sigs and future gitian bu…
laanwj Feb 2, 2017
885cfdd
Fix super-unlikely race introduced in 236618061a445d2cb11e72
TheBlueMatt Feb 2, 2017
80ff034
Dont deserialize nVersion into CNode, should fix #9212
TheBlueMatt Dec 15, 2016
2046617
net: deserialize the entire version message locally
theuni Jan 18, 2017
12752af
net: don't run callbacks on nodes that haven't completed the version …
theuni Jan 21, 2017
7a8c251
net: Disallow sending messages until the version handshake is complete
theuni Jan 26, 2017
08bb6f4
net: log an error rather than asserting if send version is misused
theuni Feb 2, 2017
7ea0ad5
Fail in DecodeHexTx if there is extra data at the end
TheBlueMatt Jun 6, 2015
922bea9
Better handle invalid parameters to signrawtransaction
TheBlueMatt Jan 28, 2017
691710a
[qa] Test that decoderawtransaction throws with extra data appended
TheBlueMatt Feb 2, 2017
ec4f7e4
[qa] Add second input to signrawtransaction test case
TheBlueMatt Feb 2, 2017
4ec057d
[wallet] Set correct metadata on bumpfee wallet transactions
ryanofsky Feb 2, 2017
6dbfe08
[qa] test signrawtransaction merge with missing inputs
TheBlueMatt Feb 2, 2017
fd13eca
Lock cs_vSend and cs_inventory in a consistent order even in TRY
TheBlueMatt Feb 3, 2017
8465631
Always enforce lock strict lock ordering (try or not)
TheBlueMatt Feb 3, 2017
7b2d96b
Access WorkQueue::running only within the cs lock.
TheBlueMatt Feb 3, 2017
a351162
Merge #9679: Access WorkQueue::running only within the cs lock
laanwj Feb 4, 2017
4966917
Merge #9609: net: fix remaining net assertions
laanwj Feb 4, 2017
7821db3
Merge #9671: Fix super-unlikely race introduced in 236618061a445d2cb1…
laanwj Feb 4, 2017
2a962d4
Fixup style a bit by moving { to the same line as if statements
TheBlueMatt Feb 4, 2017
ac719c9
Init ECC context for test_bitcoin_fuzzy.
gmaxwell Feb 5, 2017
923dc44
Merge #9578: Add missing mempool lock for CalculateMemPoolAncestors
sipa Feb 5, 2017
fc67cd2
Merge #9691: Init ECC context for test_bitcoin_fuzzy.
laanwj Feb 6, 2017
8d6447e
Merge #9673: Set correct metadata on bumpfee wallet transactions
laanwj Feb 6, 2017
986ba00
Merge #9651: Fix typos
laanwj Feb 6, 2017
09e0c28
Merge #9659: Net: Turn some methods and params/variables const
laanwj Feb 6, 2017
40f7e27
Merge #9650: Better handle invalid parameters to signrawtransaction
laanwj Feb 6, 2017
870cd2b
Merge #9378: [trivial] Add documentation for CWalletTx::fFromMe member.
laanwj Feb 6, 2017
02464da
Merge #9227: Make nWalletDBUpdated atomic to avoid a potential race.
laanwj Feb 6, 2017
45e2e08
net: rearrange so that socket accesses can be grouped together
theuni Feb 6, 2017
9a0b784
net: add a lock around hSocket
theuni Feb 6, 2017
8713de8
build: Add options to override BDB cflags/libs
laanwj Feb 7, 2017
5cc2ebb
Update OpenBSD and FreeBSD build steps
laanwj Feb 7, 2017
729de15
Merge #9604: [Trivial] add comment about setting peer as HB peer.
laanwj Feb 7, 2017
b709fe7
Merge #9532: Remove unused variables
laanwj Feb 7, 2017
a47da4b
Use z = std::max(x - y, 0); instead of z = x - y; if (z < 0) z = 0;
practicalswift Feb 3, 2017
29c5328
bench: Fix initialization order in registration
laanwj Feb 7, 2017
618ee92
Further-enforce lockordering by enforcing directly after TRY_LOCKs
TheBlueMatt Feb 7, 2017
2cbd119
Disconnect peers which we do not receive VERACKs from within 60 sec
TheBlueMatt Feb 7, 2017
d304fef
Merge #9712: bench: Fix initialization order in registration
Feb 8, 2017
6a55515
Merge #9705: build: Add options to override BDB cflags/libs
laanwj Feb 8, 2017
dd163f5
Merge #9674: Always enforce strict lock ordering (try or not)
laanwj Feb 8, 2017
9db8eec
Fix RPC failure testing
jnewbery Feb 7, 2017
8aaba7a
qa: mininode learns when a socket connects, not its first action
TheBlueMatt Feb 7, 2017
b436f92
qa: Expose on-connection to mininode listeners
TheBlueMatt Feb 7, 2017
c8cee26
Qt/Intro: Update block chain size
luke-jr Feb 8, 2017
93ffba7
Bugfix: Qt/Intro: Chain state needs to be stored even with the full b…
luke-jr Feb 8, 2017
a9baa6d
Bugfix: Qt/Intro: Pruned nodes never require *more* space
luke-jr Feb 8, 2017
36164fa
Fix typo and spelling inconsistency in CONTRIBUTING.md
Feb 3, 2017
36f9d3a
Merge #9718: Qt/Intro: Various fixes
laanwj Feb 9, 2017
ca9955e
Remove bitseed.xf2.org form the dns seed list
jonasschnelli Feb 9, 2017
66f861a
Add a test for P2P inactivity timeouts
TheBlueMatt Feb 7, 2017
33f3b21
Merge #9730: Remove bitseed.xf2.org form the dns seed list
jonasschnelli Feb 10, 2017
5e903a5
devtools: Handle Qt formatting characters edge-case in update-transla…
laanwj Feb 10, 2017
7179e7c
qt: Periodic translations update
laanwj Feb 10, 2017
4dfac2c
Update seeds tooling to Python 3
laanwj Feb 10, 2017
bfa9393
contrib/seeds: Update PATTERN_AGENT
laanwj Feb 10, 2017
a60677e
Pre-0.14.0 hardcoded seeds update
laanwj Feb 10, 2017
2447c10
Merge #9698: net: fix socket close race
laanwj Feb 10, 2017
321d0fc
net: fix a few races. Credit @TheBlueMatt
theuni Feb 6, 2017
644f123
Make nTimeConnected const in CNode
TheBlueMatt Feb 6, 2017
ae683c1
Avoid copying CNodeStats to make helgrind OK with buggy std::string
TheBlueMatt Feb 6, 2017
512731b
Access fRelayTxes with cs_filter lock in copyStats
TheBlueMatt Feb 6, 2017
96f42d8
Make nStartingHeight atomic
TheBlueMatt Feb 6, 2017
0f31872
Make nServices atomic
TheBlueMatt Feb 6, 2017
22b4966
Move [clean|str]SubVer writes/copyStats into a lock
TheBlueMatt Feb 6, 2017
d8f2b8a
Make nTimeBestReceived atomic
TheBlueMatt Feb 6, 2017
036073b
Move CNode::addrName accesses behind locked accessors
TheBlueMatt Feb 6, 2017
db2dc7a
Move CNode::addrLocal access behind locked accessors
TheBlueMatt Feb 6, 2017
b860915
Merge #9707: Fix RPC failure testing
Feb 10, 2017
442887f
Require timestamps for importmulti keys
ryanofsky Feb 3, 2017
3cf9917
Add test to check new importmulti "now" value
ryanofsky Feb 6, 2017
266a811
Use MTP for importmulti "now" timestamps
ryanofsky Feb 7, 2017
a58370e
Dedup nTimeFirstKey update logic
ryanofsky Nov 8, 2016
a80f98b
Use importmulti timestamp when importing watch only keys
ryanofsky Nov 8, 2016
a06ede9
Merge #9708: Clean up all known races/platform-specific UB at the tim…
sipa Feb 10, 2017
d978c41
Merge #9736: Pre-0.14.0 hardcoded seeds update
laanwj Feb 11, 2017
0b4f273
Bugfix: Qt/Options: Restore persistent "restart required" notice
luke-jr Feb 13, 2017
9acf25c
Return error when importmulti called with invalid address.
ryanofsky Feb 13, 2017
c45b9fb
net: correctly ban before the handshake is complete
theuni Feb 7, 2017
8502e7a
net: parse reject earlier
theuni Feb 8, 2017
cbfc5a6
net: require a verack before responding to anything else
theuni Feb 8, 2017
5b5e4f8
qa: mininode learns when a socket connects, not its first action
TheBlueMatt Feb 7, 2017
8650bbb
qa: Expose on-connection to mininode listeners
TheBlueMatt Feb 7, 2017
d943491
qa: add a test to detect leaky p2p messages
theuni Feb 8, 2017
ec66d06
Merge #9735: devtools: Handle Qt formatting characters edge-case in u…
laanwj Feb 14, 2017
4b6cccc
Selectively suppress deprecation warnings
jonasschnelli Feb 14, 2017
edc9e63
Merge #9682: Require timestamps for importmulti keys
laanwj Feb 14, 2017
b08656e
Merge #9715: Disconnect peers which we do not receive VERACKs from wi…
laanwj Feb 14, 2017
e87ce95
Merge #9720: net: fix banning and disallow sending messages before re…
laanwj Feb 14, 2017
a441db0
Merge #9755: Bugfix: Qt/Options: Restore persistent "restart required…
jonasschnelli Feb 14, 2017
4c69d68
Merge #9553: Use z = std::max(x - y, 0) instead of z = x - y; if (z <…
laanwj Feb 15, 2017
d8e8b06
Merge #9108: Use importmulti timestamp when importing watch only keys…
laanwj Feb 15, 2017
6c5427d
wallet: Prevent "overrides a member function but is not marked 'overr…
laanwj Feb 15, 2017
ba803ef
Harden against mistakes handling invalid blocks
sdaftuar Feb 13, 2017
476cc47
Merge #9758: Selectively suppress deprecation warnings
laanwj Feb 15, 2017
7a93af8
Merge #9756: Return error when importmulti called with invalid address.
laanwj Feb 15, 2017
07afcd6
Add missing cs_wallet lock that triggers new lock held assertion
ryanofsky Feb 15, 2017
1e92e04
Merge #9765: Harden against mistakes handling invalid blocks
laanwj Feb 16, 2017
f8af89a
Merge #9764: wallet: Prevent "overrides a member function but is not …
laanwj Feb 16, 2017
e43a585
Merge #9771: Add missing cs_wallet lock that triggers new lock held a…
laanwj Feb 16, 2017
00e623d
[Trivial] Update comments referencing main.cpp
CryptAxe Feb 15, 2017
8743320
Merge #9763: [Trivial] Update comments referencing main.cpp
laanwj Feb 16, 2017
8be0866
[qa] Simplify import-rescan.py
ryanofsky Feb 14, 2017
c28583d
[qa] Extend import-rescan.py to test specific key timestamps
ryanofsky Feb 14, 2017
38d3e9e
[qa] Extend import-rescan.py to test imports on pruned nodes.
ryanofsky Feb 15, 2017
afae75f
Merge #9675: Fix typo and spelling inconsistency in CONTRIBUTING.md
laanwj Feb 16, 2017
e662af3
Use 2 hour grace period for key timestamps in importmulti rescans
ryanofsky Feb 14, 2017
3f78e46
Update nMinimumChainWork and defaultAssumeValid.
gmaxwell Feb 16, 2017
91fb506
Add two hour buffer to manual pruning
morcos Feb 16, 2017
55c403b
Ensure `-maxsigcachesize` is in valid range
jnewbery Feb 15, 2017
8dee822
Merge #9777: Handle unusual maxsigcachesize gracefully
laanwj Feb 17, 2017
3c02b95
Merge #9779: Update nMinimumChainWork and defaultAssumeValid.
laanwj Feb 17, 2017
ad168ef
Merge #9778: Add two hour buffer to manual pruning
laanwj Feb 17, 2017
9828f9a
Merge #9761: Use 2 hour grace period for key timestamps in importmult…
laanwj Feb 17, 2017
bc69f34
build: bump version to 0.14.0
laanwj Feb 17, 2017
f68e441
qt: pre-rc1 translations update
laanwj Feb 17, 2017
1a02ecc
doc: Update release notes from wiki
laanwj Feb 17, 2017
268c390
doc: Update manpages for 0.14.0
laanwj Feb 17, 2017
42f5f21
release: bump gitian descriptors for a new 0.14 package cache
theuni Feb 17, 2017
6d61a2b
Merge #9783: release: bump gitian descriptors for a new 0.14 package …
laanwj Feb 17, 2017
871e19a
doc: Add list of authors to release notes
laanwj Feb 17, 2017
1577f07
Restore removed release notes.
gmaxwell Feb 17, 2017
6187091
doc: Add changelog for 0.14.0 to release notes
laanwj Feb 17, 2017
04396bc
Merge #9784: Restore removed release notes.
laanwj Feb 17, 2017
f873564
Make KEY_SIZE a compile-time constant
sipa Feb 17, 2017
973e345
Move BIP70_MAX_PAYMENTREQUEST_SIZE to header
sipa Feb 17, 2017
2afefea
boost: remove iostreams includes
theuni Feb 17, 2017
40c754c
[wallet] Remove importmulti always-true check
ryanofsky Feb 14, 2017
6552729
Bugfix: RPC/Mining: GBT should return 1 MB sizelimit before segwit ac…
luke-jr Jan 23, 2017
861cb0c
QA: Test GBT size/weight limit values
luke-jr Feb 2, 2017
3972a8e
Read/write mempool.dat as a binary.
paveljanik Feb 20, 2017
ae1c4e2
Fix typo in release notes.
dooglus Feb 19, 2017
e22c067
Fix for issue #9775. Added check for open() returning a NULL pointer.
kirit93 Feb 19, 2017
7d75a5a
Fix segfault crash when shutdown the GUI in disablewallet mode
jonasschnelli Feb 21, 2017
9072395
Return errors from importmulti if complete rescans are not successful
ryanofsky Feb 16, 2017
9d3f9d2
[Trivial] Remove incorrect help message from gettxoutproof()
jnewbery Feb 7, 2017
599c69a
Fix pruning test broken by 2 hour manual prune window
ryanofsky Feb 21, 2017
260c71c
qa: Check return code when stopping nodes
Feb 22, 2017
749fe95
build: warn about variable length arrays
theuni Feb 21, 2017
05e906d
build: add --enable-werror option
theuni Feb 21, 2017
99fd85c
build: force a c++ standard to be specified
theuni Feb 22, 2017
847e375
qt: pre-rc2 translations update
laanwj Feb 23, 2017
3b2f7fd
doc: Add authors and changes since rc1 to release notes
laanwj Feb 23, 2017
95e68df
release: add a few performance-related notes
theuni Feb 17, 2017
f004296
Merge #9787: release: add a few performance-related notes
laanwj Feb 23, 2017
fa230fd
doc: Small release notes fixups in the list of pulls
Feb 24, 2017
3584902
Merge #9846: doc: Small release notes fixups in the list of pulls
laanwj Feb 24, 2017
eddaa6b
[qa] Make import-rescan.py watchonly check reliable
ryanofsky Feb 23, 2017
50ae5c7
Document increase in memory usage due to mempool/dbcache sharing
TheBlueMatt Feb 26, 2017
29bae0c
Mention bumpfee in 0.14 release notes.
ryanofsky Feb 27, 2017
50953c2
tests: Fix dangling pwalletMain pointer in wallet tests
laanwj Feb 27, 2017
69832aa
don't throw std::bad_alloc when out of memory. Instead, terminate imm…
theuni Feb 24, 2017
775cf54
prevector: assert successful allocation
theuni Feb 25, 2017
5aaac4d
Merge #9878: Mention bumpfee in 0.14 release notes.
laanwj Feb 28, 2017
08e0690
Update sendfrom RPC help to correct coin selection misconception
ryanofsky Feb 23, 2017
a48b998
[doc] Update doc/bips.md for BIP90 implementation
sdaftuar Feb 27, 2017
1f83663
Merge #9866: Document increase in memory usage due to mempool/dbcache…
laanwj Feb 28, 2017
289204f
Change bitcoin address in RPC helpaddress to an invalid address, so p…
marijnfs Feb 26, 2017
1825a03
Avoid VLA in hash.h
sipa Feb 17, 2017
8d2d08e
qt: pre-rc3 translations update
laanwj Feb 28, 2017
58800e3
doc: pre-rc3 changelog update
laanwj Feb 28, 2017
ad24256
Fix importmulti returning rescan errors for wrong keys
ryanofsky Feb 22, 2017
5e70912
Add Pieter's old signed commits to revsig-commits
TheBlueMatt Feb 28, 2017
eff783a
depends: make osx output deterministic
theuni Feb 28, 2017
a80dc94
Bugfix: Only install manpages for built programs
luke-jr Feb 28, 2017
589cd63
Allow any subkey in verify-commits
TheBlueMatt Mar 4, 2017
ccf5e43
Merge #9920: [0.14] Allow any subkey in verify-commits (BlueMatt)
laanwj Mar 5, 2017
43a987c
Fix regsig checking for subkey sigs in verify-commits
TheBlueMatt Mar 5, 2017
808be3f
--- bitcore start ---
Jun 2, 2016
d9bee47
indexes: adds additional address, spent and timestamp indexes
Oct 4, 2016
9dcd6d4
rpc: adds rpc commands for address, spent and timestamp indexes
Oct 4, 2016
b2a6d04
tests: adds rpc tests for address, spent and timestamp indexes
Oct 4, 2016
2212e82
tests: adds unit test for IsPayToPublicKeyHash method
Oct 4, 2016
b6be3b8
indexes: refactoring and fixes applying changes to 0.13
Oct 5, 2016
9420cba
indexes: additional logging and checks for indexes
Oct 5, 2016
5acd425
tests: update rpc index tests for 0.13
Oct 5, 2016
6f1ebe9
db: add options to configure block index database
Jul 13, 2016
59738d9
tests: test dbwrapper options compression and maxopenfiles
Jul 14, 2016
9891651
doc: optional dbmaxopenfiles and dbcompression
Oct 6, 2016
9c1ea96
tests: include and fix txindex test with rpc tests
braydonf Oct 7, 2016
06efaec
build: include timestampindex.h in makefile
Oct 7, 2016
539d7ec
Bitcore 0.14.0 fixes
karelbilek Apr 2, 2017
917a910
Adding docker build
karelbilek Apr 7, 2017
11bb81a
Using different docker build
karelbilek Apr 16, 2017
063590d
Update README.md
karelbilek May 15, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Introduce MemPoolConflictRemovalTracker
Analogue to ConnectTrace that tracks transactions that have been removed from the mempool due to conflicts and then passes them through SyncTransaction at the end of its scope.
  • Loading branch information
morcos committed Jan 23, 2017
commit 4afbde6028708541c4da8732a1bd12fb8735fdae
45 changes: 45 additions & 0 deletions src/validation.cpp
Original file line number Diff line number Diff line change
@@ -157,6 +157,39 @@ namespace {
set<int> setDirtyFileInfo;
} // anon namespace

/* Use this class to start tracking transactions that are removed from the
* mempool and pass all those transactions through SyncTransaction when the
* object goes out of scope. This is currently only used to call SyncTransaction
* on conflicts removed from the mempool during block connection. Applied in
* ActivateBestChain around ActivateBestStep which in turn calls:
* ConnectTip->removeForBlock->removeConflicts
*/
class MemPoolConflictRemovalTracker
{
private:
std::vector<CTransactionRef> conflictedTxs;
CTxMemPool &pool;

public:
MemPoolConflictRemovalTracker(CTxMemPool &_pool) : pool(_pool) {
pool.NotifyEntryRemoved.connect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this, _1, _2));
}

void NotifyEntryRemoved(CTransactionRef txRemoved, MemPoolRemovalReason reason) {
if (reason == MemPoolRemovalReason::CONFLICT) {
conflictedTxs.push_back(txRemoved);
}
}

~MemPoolConflictRemovalTracker() {
pool.NotifyEntryRemoved.disconnect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this, _1, _2));
for (const auto& tx : conflictedTxs) {
GetMainSignals().SyncTransaction(*tx, NULL, CMainSignals::SYNC_TRANSACTION_NOT_IN_BLOCK);
}
conflictedTxs.clear();
}
};

CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator)
{
// Find the first block the caller has in the main chain
@@ -2453,6 +2486,14 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
bool fInitialDownload;
{
LOCK(cs_main);
{ // TODO: Tempoarily ensure that mempool removals are notified before
// connected transactions. This shouldn't matter, but the abandoned
// state of transactions in our wallet is currently cleared when we
// receive another notification and there is a race condition where
// notification of a connected conflict might cause an outside process
// to abandon a transaction and then have it inadvertantly cleared by
// the notification that the conflicted transaction was evicted.
MemPoolConflictRemovalTracker mrt(mempool);
CBlockIndex *pindexOldTip = chainActive.Tip();
if (pindexMostWork == NULL) {
pindexMostWork = FindMostWorkChain();
@@ -2476,6 +2517,10 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
fInitialDownload = IsInitialBlockDownload();

// throw all transactions though the signal-interface

} // MemPoolConflictRemovalTracker destroyed and conflict evictions are notified

// Transactions in the connnected block are notified
for (const auto& pair : connectTrace.blocksConnected) {
assert(pair.second);
const CBlock& block = *(pair.second);