Commit graph

9250 commits

Author SHA1 Message Date
Wladimir J. van der Laan a6548a47a5
Merge #10201: pass Consensus::Params& to ReceivedBlockTransactions()
25660e9 pass Consensus::Params& to ReceivedBlockTransactions() (Mario Dian)

Tree-SHA512: d3a5b19d93313e4bda622b322bc9cbfb7e31486010eac40fca6eea9703f814f9667f778122ba7366bb304482a2c03e2e3325083beecac374751692361952e467
2017-04-21 18:42:06 +02:00
Pieter Wuille f478d98fe4 Fix some empty vector references
streams.h has some methods that can be tricked into dereferencing
null pointers or end() iterators. Fix this.
2017-04-21 05:58:31 -07:00
Wladimir J. van der Laan 27faa6cccd
Merge #10228: build: regenerate bitcoin-config.h as necessary
91ab8f5 build: fix bitcoin-config.h regeneration after touching build files (Cory Fields)
3577603 build: remove wonky auto top-level convenience targets (Cory Fields)

Tree-SHA512: 2e68634439eeb7eca43cd2858135a583bfe0cf146e021a8384a24f7267aacc6f99bdc7a6d497a04d32e6a03e9446f0f599afb5bd53346dadf19f47d5fb2ea9f9
2017-04-21 11:12:29 +02:00
Wladimir J. van der Laan f6f3b58a72
Merge #10242: [qt] Don't call method on null WalletModel object
fb463d1 [qt] Don't call method on null WalletModel object (Russell Yanofsky)

Tree-SHA512: 84c9d394a16eb44e2673e7d16961ea9514fd0ef3912baf7cd7b8424a46ead138ac8ecc59c4eebfb46941fa3081555fd6ee15fec699a3952e81f960932e06cee0
2017-04-21 10:57:16 +02:00
Wladimir J. van der Laan 86ea3c2ff2
Merge #10181: Include cleanup
1c897fc Missing includes (Jorge Timón)
a1fd450 Trivial: Remove unneeded includes from .h: (Jorge Timón)

Tree-SHA512: ada3e62cc2435e58172a88b380be371b717a05725956c15e5493b6e19fe2903e5e6e43fd22dc24699333a0e8a0c7b42eb1ae61b41cb4ba82495be18e2d4ef3c6
2017-04-20 23:24:00 +02:00
Russell Yanofsky fb463d1717 [qt] Don't call method on null WalletModel object
This doesn't crash currently because the method doesn't access any object
members, but this behavior is fragile and incompatible with #10102.
2017-04-20 15:17:17 -04:00
Wladimir J. van der Laan 14c948987f
Merge #9942: Refactor CBlockPolicyEstimator
68af651 MOVEONLY: move TxConfirmStats to cpp (Alex Morcos)
2332f19 Initialize TxConfirmStats in constructor (Alex Morcos)
5ba81e5 Read and Write fee estimate file directly from CBlockPolicyEstimator (Alex Morcos)
14e10aa Call estimate(Smart)Fee directly from CBlockPolicyEstimator (Alex Morcos)
dbb9e36 Give CBlockPolicyEstimator it's own lock (Alex Morcos)
f6187d6 Make processBlockTx private. (Alex Morcos)
ae7327b Make feeEstimator its own global instance of CBlockPolicyEstimator (Alex Morcos)

Tree-SHA512: dbf3bd2b30822e609a35f3da519b62d23f8a50e564750695ddebd08553b4c01874ae3e07d792c6cc78cc377d2db33b951ffedc46ac7edaf5793f9ebb931713af
2017-04-20 21:17:17 +02:00
Wladimir J. van der Laan 987a6c0956
Merge #10231: [Qt] Reduce a significant cs_main lock freeze
4082fb0 Add missing <atomic> header in clientmodel.h (Jonas Schnelli)
928d4a9 Set both time/height header caches at the same time (Jonas Schnelli)
610a917 Declare headers height/time cache mutable, re-set the methods const (Jonas Schnelli)
cf92bce Update the remaining blocks left in modaloverlay at init. (Jonas Schnelli)
7148f5e Reduce cs_main locks during modal overlay by adding an atomic cache (Jonas Schnelli)

Tree-SHA512: a92ca22f90b8b2a5e8eb94fdce531ef44542e21a8dbbb0693f7723d7018592cb68de687a2a0aac91d31cbf019793f8e922550656d2b130ed3d854d60630341db
2017-04-20 13:41:07 +02:00
Jonas Schnelli 4082fb0003
Add missing <atomic> header in clientmodel.h 2017-04-20 13:29:12 +02:00
Wladimir J. van der Laan a987def4f6
Merge #10143: [net] Allow disconnectnode RPC to be called with node id
d54297f [tests] disconnect_ban: add tests for disconnect-by-nodeid (John Newbery)
5cc3ee2 [tests] disconnect_ban: remove dependency on urllib (John Newbery)
12de2f2 [tests] disconnect_ban: use wait_until instead of sleep (John Newbery)
2077fda [tests] disconnect_ban: add logging (John Newbery)
395561b [tests] disconnectban test - only use two nodes (John Newbery)
e367ad5 [tests] rename nodehandling to disconnectban (John Newbery)
d6564a2 [tests] fix nodehandling.py flake8 warnings (John Newbery)
23e6e64 Allow disconnectnode() to be called with node id (John Newbery)

Tree-SHA512: a371bb05a24a91cdb16a7ac4fbb091d5d3bf6554b29bd69d74522cb7523d3f1c5b1989d5e7b03f3fc7369fb727098dd2a549de551b731dd480c121d9517d3576
2017-04-20 11:47:22 +02:00
Jonas Schnelli 928d4a9ac5
Set both time/height header caches at the same time 2017-04-20 09:51:41 +02:00
Jonas Schnelli 610a91719c
Declare headers height/time cache mutable, re-set the methods const 2017-04-20 09:51:05 +02:00
Jonas Schnelli cf92bce526
Update the remaining blocks left in modaloverlay at init. 2017-04-19 20:54:30 +02:00
Jonas Schnelli 7148f5e7d7
Reduce cs_main locks during modal overlay by adding an atomic cache 2017-04-19 20:54:18 +02:00
John Newbery 23e6e64a24 Allow disconnectnode() to be called with node id
disconnectnode() can currently only be called with the IP address/port
of the node the user wishes to connect. This commit allows the node to
be disconnected using the nodeid returned by getpeerinfo().
2017-04-19 13:47:51 -04:00
Wladimir J. van der Laan c91ca0ace9
Merge #9827: Improve ScanForWalletTransactions return value
30abce7 Improve ScanForWalletTransactions return value (Russell Yanofsky)

Tree-SHA512: 195028553b103052a842b6a37e67410118a20c32475b80f7fd22d6d8622f92eca1c2d84f291d1092bef2161d3187d91052799b533e1e265b7613d51955490b8d
2017-04-19 12:30:02 +02:00
Jonas Schnelli e96486cbeb
Merge #10221: Stop treating coinbase outputs differently in GUI: show them at 1conf
608bbcc [qt] Stop treating coinbase outputs differently: show them at 1conf (Matt Corallo)

Tree-SHA512: 62ba10520da8b83cf8e97c86dec3ccdcca8b7bfae0174d1a4099d33aa5d11933cc7c248394bf67c2b105211cf7931955816c741957832e703211030c7f4f002f
2017-04-19 11:15:06 +02:00
Wladimir J. van der Laan 64c45aada7
Merge #10226: wallet: Use boost to more portably ensure -wallet specifies only a filename
a4186dd wallet: Use boost to more portably ensure -wallet specifies only a filename (Luke Dashjr)

Tree-SHA512: 6dfde31fa599638e5ec76489363e2fed97403be3e5762e4560dfc6ac261ce169a92b5a1b92bb34a893cc898e6073c81f74f49528e8df07e86273ddb37dd1ce80
2017-04-19 10:55:13 +02:00
Cory Fields 91ab8f5a99 build: fix bitcoin-config.h regeneration after touching build files
This was a long-standing and annoying problem.

If autogen.sh was not manually run after touching configure.ac,
bitcoin-config.h would not be properly regenerated. This causes very subtle
problems when configure appears to enable a new value, but it does not end up
reflected in the build.
2017-04-18 19:14:25 -04:00
Luke Dashjr a4186dd239 wallet: Use boost to more portably ensure -wallet specifies only a filename 2017-04-18 15:39:16 +00:00
Wladimir J. van der Laan 393160cf6c
Merge #10208: [wallet] Rescan abortability
9141622 [rpc] Add abortrescan command to RPC interface. (Kalle Alm)
75a08e7 [wallet] Add support for aborting wallet transaction rescans. (Kalle Alm)

Tree-SHA512: 18545a1dc48c6dc112993f971f3adc7c0341fa621186c6d70bef1052e1d127ca116c5769595d721a209d502ca2019f2ad33876fe35d2b17216393404607a6c76
2017-04-18 08:05:24 +02:00
Kalle Alm 9141622a0f
[rpc] Add abortrescan command to RPC interface. 2017-04-18 11:41:46 +09:00
MarcoFalke 50a1cc0f0a
Merge #10207: Clarify importprivkey help text ... example of blank label without rescan
c9e31c3 Clarify importprivkey help text with example of blank label without rescan Occasionally I waste a lot of time not remembering that the second parameter to importprivkey must be blank if you intend to stop rescan with "false" as the third parameter. (Warren Togami)

Tree-SHA512: 23781e1d6fd59a9d06d6e12ad10e8ed6641947b3e4a1f66c8fdb5d44cbd8f291e8f2a5e686aa9f9ba5e4bab8ca688caa17244e837f651546055ddf7cc8e7df8f
2017-04-17 22:11:03 +02:00
Kalle Alm 75a08e7d17
[wallet] Add support for aborting wallet transaction rescans. 2017-04-17 23:35:53 +09:00
Matt Corallo 608bbccfb9 [qt] Stop treating coinbase outputs differently: show them at 1conf 2017-04-17 10:16:21 -04:00
Wladimir J. van der Laan 2584925077
Merge #10178: Remove CValidationInterface::UpdatedTransaction
9fececb Remove CValidationInterface::UpdatedTransaction (Matt Corallo)
d89f8ad Make DisconnectBlock and ConnectBlock static in validation.cpp (Matt Corallo)

Tree-SHA512: 146597b538c09c1e8071f4f88ffeba0645c6816f86030b142174bd298cc18ae09a400e6ca8de04d091e37b635f99f4c05982c09e6729691eb8ca6b8439ab97ca
2017-04-17 14:46:04 +02:00
Pieter Wuille a077a90da8
Merge #10215: Check interruptNet during dnsseed lookups
b2c9254 Check interruptNet during dnsseed lookups (Matt Corallo)

Tree-SHA512: a76b5749b085d5571ac65a6925bb1c50fa1d02c02854d9126224dc2ec419eb9103f7c92bf9a0bbd39c7dee93a2266dc3973fb16b48e8daea057f45d452e2513c
2017-04-17 05:15:37 -07:00
Pieter Wuille c5e9e428a9
Merge #9693: Prevent integer overflow in ReadVarInt.
45f0961 Prevent integer overflow in ReadVarInt. (Gregory Maxwell)

Tree-SHA512: 385ea0efb6b59d44c45a49227e5f6fff236b4775544cbeb236312a3fd87fd75c226ac56f7aa1bca66b853639da75a579610074f7582f92cf2ebd4a74bc40f6f0
2017-04-17 04:58:31 -07:00
Matt Corallo b2c9254205 Check interruptNet during dnsseed lookups 2017-04-14 16:52:42 -04:00
Wladimir J. van der Laan f4db00f9a5
Merge #10204: [rpc] rename disconnectnode argument
883154c [rpc] rename disconnectnode argument (John Newbery)

Tree-SHA512: 14245befd0a7315edd9e03c8bb283ff6b546cf4ef93c3ce02c01de687fea3bb96c510a638a42d2d6799e5e3e5b4f800021c2530b504baeaa4a4dc99323165986
2017-04-14 10:16:01 +02:00
Warren Togami c9e31c36ff Clarify importprivkey help text with example of blank label without rescan
Occasionally I waste a lot of time not remembering that the second parameter to importprivkey must be blank if you intend to stop rescan with "false" as the third parameter.
2017-04-13 20:11:42 -07:00
John Newbery 883154cbcb [rpc] rename disconnectnode argument 2017-04-13 15:38:59 -04:00
Pieter Wuille b7365f0545
Merge #9480: De-duplicate SignatureCacheHasher
f9c8807 Deduplicate SignatureCacheHasher (Jeremy Rubin)

Tree-SHA512: 714a0f39d1c836fedd1868369b4ebf1096cd800cc544d57b54101da338c80c627a3e59c6644b3268054efe85053cf1a7be508af935f624491e7acfae61123994
2017-04-13 10:13:13 -07:00
Wladimir J. van der Laan eab00d96df
Merge #9665: Use cached [compact] blocks to respond to getdata messages
b49ad44 Add comment about cs_most_recent_block coverage (Matt Corallo)
c47f5b7 Cache witness-enabled state with recent-compact-block-cache (Matt Corallo)
efc135f Use cached [compact] blocks to respond to getdata messages (Matt Corallo)

Tree-SHA512: ffc478bddbf14b8ed304a3041f47746520ce545bdeffa9652eff2ccb25c8b0d5194abe72568c10f9c1b246ee361176ba217767af834752a2ca7263d292005e87
2017-04-13 17:22:26 +02:00
Mario Dian 25660e91ef pass Consensus::Params& to ReceivedBlockTransactions() 2017-04-13 22:37:46 +08:00
Matt Corallo 9fececb2cb Remove CValidationInterface::UpdatedTransaction
This removes another callback from block connection logic, making it
easier to reason about the wallet-RPCs-returns-stale-info issue.

UpdatedTransaction was previously used by the GUI to display
coinbase transactions only after they have a block built on top of
them. This worked fine for in most cases, but only worked due to a
corner case if the user received a coinbase payout in a block
immediately prior to restart. In that case, the normal process of
caching the most recent coinbase transaction's hash would not work,
and instead it would only work because of the on-load -checkblocks
calling DisconnectBlock and ConnectBlock on the current tip.

In order to make this more robust, a full mapWallet loop after the
first block which is connected after restart was added.
2017-04-13 10:36:21 -04:00
Wladimir J. van der Laan cf8a8b1028
Merge #10176: net: gracefully handle NodeId wrapping
c851be4 net: define NodeId as an int64_t (Cory Fields)

Tree-SHA512: 2ccc931cfcdc555313b9434d8de2f6cea759b31891212ca62f962208f60157d4fc593010e3ca61265d1a20d6f78c6ca79103600b85df77983d5509d192875b96
2017-04-13 16:35:27 +02:00
Wladimir J. van der Laan 70f6f56e9d
Merge #10165: [Wallet] Refactoring by using CInputCoin instead of std::pair
c37e32a [Wallet] Prevent CInputCoin to be in a null state (NicolasDorier)
f597dcb [Wallet] Simplify code using CInputCoin (NicolasDorier)
e78bc45 [Wallet] Decouple CInputCoin from CWalletTx (NicolasDorier)
fd44ac1 [Wallet] Rename std::pair<const CWalletTx*, unsigned int> to CInputCoin (NicolasDorier)

Tree-SHA512: d24361fc514a0566bce1c3953d766dfe4fece79c549cb4db2600695a4ce08e85caa61b7717812618e523a2f2a1669877dad2752ed079e2ed2d27249f9bc8590e
2017-04-13 12:08:26 +02:00
Wladimir J. van der Laan c9ff4f8ee6
Merge #10186: Remove SYNC_TRANSACTION_NOT_IN_BLOCK magic number
d0cd0bd Make CWallet::SyncTransactions() interface friendlier (John Newbery)
714e4ad AddToWalletIfInvolvingMe should test pIndex, not posInBlock (John Newbery)

Tree-SHA512: d02e7ffce635c53f3e099c37cc5613b431f74e0e3ea189269132901a99fc539477849ddad0282ce721d46a4d794c2d46523d58b64f0c26c655f70b5808c745a5
2017-04-13 10:50:00 +02:00
NicolasDorier c37e32af0d [Wallet] Prevent CInputCoin to be in a null state 2017-04-13 05:32:24 +00:00
NicolasDorier f597dcb7c8 [Wallet] Simplify code using CInputCoin 2017-04-13 05:31:08 +00:00
NicolasDorier e78bc45810 [Wallet] Decouple CInputCoin from CWalletTx 2017-04-13 05:30:52 +00:00
Jorge Timón 1c897fc3da
Missing includes 2017-04-13 02:31:44 +02:00
Jorge Timón a1fd450328
Trivial: Remove unneeded includes from .h:
- validation.h doesn't need to include chain.h anymore
- Remove unneeded includes from net.h
2017-04-13 02:27:27 +02:00
Jeremy Rubin f9c88079df Deduplicate SignatureCacheHasher
This moves the SignatureCacheHasher to the sigcache header, out of the anonymous
namespace, so that the tests can import it.
2017-04-12 14:42:41 -07:00
Wladimir J. van der Laan de01da7cad
Merge #10177: Changed "Send" button default status from true to false
8c3e6c6 Changed "Send" button default status from true to false (KibbledJiveElkZoo)

Tree-SHA512: e60d7481351e88925d99b33bdb616f3c234e93ef052571b9c4a1328186ec9abb8b61b0c4299afcb731edad2634aef6b1adaad121646b6c0c56dc933662904674
2017-04-12 20:15:37 +02:00
Wladimir J. van der Laan 350b22497c
Merge #10150: [rpc] Add logging rpc
7fd50c3 allow libevent logging to be updated during runtime (John Newbery)
5255aca [rpc] Add logging RPC (John Newbery)
4d9950d Set BCLog::LIBEVENT correctly for old libevent versions. (John Newbery)

Tree-SHA512: d6788a7205372c0528da71eca052910dfb055f2940ca884f422ff3db66e23a2b49c6a15b8f27d5255554fe5c5a928f5dd903fdc63b0bd6c8fa7783e77bb30fe8
2017-04-12 19:57:22 +02:00
Cory Fields c851be4b25 net: define NodeId as an int64_t
This should make occurances of NodeId wrapping essentially impossible for
real-world usage.
2017-04-12 13:42:02 -04:00
John Newbery d0cd0bd6d9 Make CWallet::SyncTransactions() interface friendlier 2017-04-11 17:17:46 -04:00
John Newbery 714e4ad13d AddToWalletIfInvolvingMe should test pIndex, not posInBlock 2017-04-11 10:23:32 -04:00