Commit Graph

13294 Commits

Author SHA1 Message Date
Matt Corallo b3ec305f8e Fix bashisms in verify-commits and always check top commit's tree 2017-03-06 16:59:08 -05:00
Matt Corallo f20e664f40 Check gpg version before setting --weak-digest 2017-03-06 16:59:07 -05:00
kobake 292112f87e Fix msvc compiler error C4146 (minus operator applied to unsigned type)
On msvc14, the compiler error C4146 (unary minus operator applied to unsigned type, result still unsigned) had been occured.
Use '0 - x' styled formula instead of '-x' so as to fix the error.
2017-03-07 02:42:44 +09:00
Wladimir J. van der Laan 72fb5158b1
Merge #9906: Disallow copy constructor CReserveKeys
188f89c Disallow copy of CReserveKeys (Gregory Sanders)

Tree-SHA512: e55ce10bf7f2dc91de9797e60ab7767fb51f25255995d62ddf358c52b7aaa23c26fbfb522e1610ff950b86804ddbc38dc0d7708bfab2c4d33ad99a275d8c77db
2017-03-06 18:33:24 +01:00
Wladimir J. van der Laan d5ce14e223
Merge #9929: tests: Delete unused function _rpchost_to_args
99fecf8 tests: Delete unused function _rpchost_to_args (Wladimir J. van der Laan)

Tree-SHA512: 40911d048d3fd7b3ce83e9b3caf2a409d55b47cbe08ea4450a16ca72264300bb12d5ef7dbcf335885975119b5977f949e6879546840064138fb506e24494d849
2017-03-06 18:32:38 +01:00
Wladimir J. van der Laan c78adbf450
Merge #9843: Fix segwit getblocktemplate test
b23dcd2 Fix segwit getblocktemplate test. (John Newbery)

Tree-SHA512: db87a99432397bd9aa3b66580a92a69467aa4c8a9e3a191629429f80137a59f6ecb13d129d880ebe404d903e13b153aca3ca99e3b1a94e171a4b8a50fb690f3f
2017-03-06 18:06:00 +01:00
Wladimir J. van der Laan 4df8213b98
Merge #9880: Verify Tree-SHA512s in merge commits, enforce sigs are not SHA1
bbd7579 Fix regsig checking for subkey sigs in verify-commits (Matt Corallo)
d025bc7 Allow any subkey in verify-commits (Matt Corallo)
eddc77a Add comment re: why SHA1 is disabled (Peter Todd)
d9c450f Verify Tree-SHA512s in merge commits, enforce sigs are not SHA1 (Matt Corallo)
be908a6 Fail merge if there are any symlinks (Matt Corallo)

Tree-SHA512: bb66c59cc1c6b1c86d7d8be7adb0769c6598c0e28ad927409941f30af87d390521e82fc13700ee22e92db1bd571db3e19a152ec7b2c0349c6e06f5de62c0b65f
2017-03-06 17:19:40 +01:00
Wladimir J. van der Laan 99fecf80dc tests: Delete unused function _rpchost_to_args
This function has been unused ever since the RPC tests no longer use
`bitcoin-cli`.
2017-03-06 15:52:25 +01:00
Gregory Sanders 188f89c3bb Disallow copy of CReserveKeys 2017-03-06 09:26:10 -05:00
Wladimir J. van der Laan 8a3b07529d
Merge #8574: [Wallet] refactor CWallet/CWalletDB/CDB
7184e25 [Wallet] refactor CWallet/CWalletDB/CDB (Jonas Schnelli)

Tree-SHA512: a1993dcfc3505459613e8be3f6560ef32466fd7c649bff358f12af118e633aadd648a090f4af60743a827c9cb624e4ec63eb0202326da4779fc18249bb77da1e
2017-03-06 14:23:28 +01:00
Jonas Schnelli 7184e25c80
[Wallet] refactor CWallet/CWalletDB/CDB
Try to hide CDB/bitdb behinde CWalletDB.
Prepare for full wallet database abstraction.
2017-03-06 11:30:24 +01:00
Wladimir J. van der Laan fa625b078b
Merge #9333: Document CWalletTx::mapValue entries and remove erase of nonexistent "version" entry.
87ed396 [trivial] Add comment documenting bumpfee mapValues (Russell Yanofsky)
a1fe944 Remove reference to nonexistent "version" wallet transaction mapvalue field (Russell Yanofsky)
654e044 [trivial] Add comment documenting CWalletTx::mapValue (Russell Yanofsky)

Tree-SHA512: 1fd1860e345c59b13634db2007fff4ba30aaf1f177fdd765f47bf9257fac117cdcd5d491424416da304c08e85effbb27f3424f072f7c9587ef39cb98531b932a
2017-03-06 10:18:19 +01:00
Wladimir J. van der Laan d32581cc29
Merge #9547: bench: Assert that division by zero is unreachable
db07f91 Assert that what might look like a possible division by zero is actually unreachable (practicalswift)

Tree-SHA512: f1652eb37196a5b72f356503a1fbb44fb98aa8a94954ad1765f86d81ebf41a2337d4eb58c4f19937fda3752f5d2d642756e44afdbd438015b87ac20801246bff
2017-03-06 10:08:14 +01:00
Wladimir J. van der Laan 9d5fcbfb08
Merge #9739: Fix BIP68 activation test
f5aba8a Move tx version 2 standardness check to after bip68 activation (John Newbery)
99c0e81 Fix BIP68 activation test (John Newbery)

Tree-SHA512: 3633d5359705b33a22cd3d8ea28f41abd93ccc6fe9943c8004f6149add991771df9ea12b4e14192e39e14b414bb5ecc7218e516cfeec97e4c5df29778ac57060
2017-03-06 10:06:26 +01:00
Wladimir J. van der Laan 48c3429c50
Merge #9832: [qa] assert_start_raises_init_error
025dec0 [qa] assert_start_raises_init_error (NicolasDorier)

Tree-SHA512: 0fe3ecbd47625b181aed92f15445ac26993e1a8b9843bbc1088c4adcea774e503b870912a18e13dca3f255c22a9964c1c0ca92c758907538143f316c5272ea4a
2017-03-06 10:04:22 +01:00
Wladimir J. van der Laan 5a6af31722
Merge #9908: Define 7200 second timestamp window constant
e57a1fd Define 7200 second timestamp window constant (Russell Yanofsky)

Tree-SHA512: 449d20e4fd23905cd96be36f717c55a0a2360aba1002aaf55a3699cce4a41f6e94acc2fbe511a93c5cbe8f8e68386995a76cad67620ebb66ba9283e6080ab567
2017-03-06 10:02:05 +01:00
Wladimir J. van der Laan 56ab672b59
Merge #9576: [wallet] Remove redundant initialization
343ba8f [wallet] Remove redundant initialization (practicalswift)

Tree-SHA512: 54b94d7703b1735cb1ae0bd7eba61ca9d2f18e20b70e46c94aa3b0653495dce4fdea00cf953ec08215b96b5792eabb8b38c3f9b3cd36e52b82fcb2f1fd8a3540
2017-03-06 09:40:06 +01:00
NicolasDorier 025dec0e5b [qa] assert_start_raises_init_error 2017-03-06 17:21:03 +09:00
Matt Corallo bbd757940b Fix regsig checking for subkey sigs in verify-commits 2017-03-05 11:21:52 -05:00
Wladimir J. van der Laan 01b7cda916
Merge #9905: [contrib] gh-merge: Move second sha512 check to the end
fa7da3f [contrib] gh-merge: Move second sha512 check to before signing (MarcoFalke)

Tree-SHA512: b3d96f928a013f6fdc416035b8ef5cd7c750ab0922156e1fd712cd27ec75847497109f43a96559b945ba11ad43b5644ed9c1de695590ff608658628fb57b1571
2017-03-05 13:37:53 +01:00
Wladimir J. van der Laan a4d1c9f041 compat: use `unsigned int` instead of `u_int`
`u_int` is not available on some platforms (not sure what standard it's
supposed to be part of), we don't use it anywhere else, and it doesn't
hurt to simply write `unsigned int` out here.
2017-03-05 09:51:21 +00:00
Wladimir J. van der Laan 25da1ee36c build: cleanup: define MSG_DONTWAIT/MSG_NO_SIGNAL locally
Define MSG_DONTWAIT and MSG_NO_SIGNAL in the implementation files that
use them (`net.cpp` and `netbase.cpp`), instead of compat.h which is
included all over the place.

This avoids putting them in the global namespace, as defining them as 0
is a hack that works for our specific usage, but it is not a general
solution.

Also makes sure they are defined only once so the `!defined(MSG_x)` guard can go.
2017-03-05 09:47:29 +00:00
Wladimir J. van der Laan c459d509b7 build: Probe MSG_DONTWAIT in the same way as MSG_NOSIGNAL
Instead of the WIN32-specific workaround, detect lack of `MSG_DONTWAIT`
in the build system. This allows other platforms without `MSG_DONTWAIT`
to work too.
2017-03-05 09:29:37 +00:00
Matt Corallo d025bc7964 Allow any subkey in verify-commits 2017-03-04 09:41:16 -05:00
Peter Todd eddc77a1b1 Add comment re: why SHA1 is disabled 2017-03-04 09:41:16 -05:00
Matt Corallo d9c450ffb2 Verify Tree-SHA512s in merge commits, enforce sigs are not SHA1 2017-03-04 09:41:15 -05:00
Alex Morcos b421e6ddcf Update example bitcoin.conf 2017-03-03 16:50:20 -05:00
Alex Morcos 7d4e9509ad Allow setting minrelaytxfee to 0
Setting minrelaytxfee to 0 will allow all transactions regardless of fee to enter your mempool until it reaches its size limit.  However now that mempool limiting is governed by a separate incrementalrelay fee, it is an unnecessary restriction to prevent a minrelaytxfee of 0.
2017-03-03 16:50:20 -05:00
Alex Morcos 359e8a03d1 [cleanup] Remove coin age priority completely.
Remove GetPriority and ComputePriority.  Remove internal machinery for tracking priority in CTxMemPoolEntry.
2017-03-03 16:50:20 -05:00
Alex Morcos f9b9371c60 [rpc] Remove priorityDelta from prioritisetransaction
This a breaking API change to the prioritisetransaction RPC call which previously required exactly three arguments and now requires exactly two (hash and feeDelta).  The function prioritiseTransaction is also updated.
2017-03-03 16:50:19 -05:00
Alex Morcos 49be7e1bef [rpc] Remove priority information from mempool RPC calls
"startingpriority" and "currentpriority" are no longer returned in the JSON information about a mempool entry.  This affects getmempoolancestors, getmempooldescendants, getmempooolentry, and getrawmempool.
2017-03-03 16:50:19 -05:00
Alex Morcos 0315888d0d [test] Remove priority from tests
Remove all coin age priority functionality from unit tests and RPC tests.
2017-03-03 16:50:19 -05:00
Alex Morcos f838005444 No longer allow "free" transactions
Remove -limitfreerelay and always enforce minRelayTxFee in the mempool (except from disconnected blocks)

Remove -relaypriority, the option was only used for the ability to allow free transactions to be relayed regardless of their priority.  Both notions no longer apply.
2017-03-03 16:50:19 -05:00
Russell Yanofsky e57a1fd899 Define 7200 second timestamp window constant 2017-03-03 13:51:41 -05:00
Suhas Daftuar 02c57b521a Optimize GetWitnessHash() for non-segwit transactions 2017-03-03 13:33:42 -05:00
Russell Yanofsky 630fc549e2 Clean up braces in CWallet::ComputeTimeSmart 2017-03-03 11:22:44 -05:00
Wladimir J. van der Laan 53c300fb52
Merge #9910: Docs: correct and elaborate -rpcbind doc
e5b449c Docs: correct and elaborate -rpcbind doc (Ian Kelling)

Tree-SHA512: e1cdaa32f7248f304d463e3f37d7d5da23ee0e506bd453420b87f4cc9c704cc30214e41c9266294890d65f2ee270f9355f38b542e8c01452637bdbba8273c755
2017-03-03 17:22:44 +01:00
Russell Yanofsky 6c996c2df7 Add documentation describing CWallet::nTimeSmart.
Most of the text comes from the 2012 Luke Dashjr <luke-jr+git@utopios.org>
c3f95ef commit message.
2017-03-03 11:22:44 -05:00
Russell Yanofsky 1f98abe47b Factor out CWallet::nTimeSmart computation into a method.
No change in behavior, this change just pulls some code out of
CWallet::AddToWallet that was making it very long into a separate method.
2017-03-03 11:22:44 -05:00
Russell Yanofsky c6b82d1db5 Add tests for CWalletTx::nTimeSmart 2017-03-03 11:22:44 -05:00
Wladimir J. van der Laan 90cb2a218e
Merge #9774: Enable host lookups for -proxy and -onion parameters
f36bdf0 Enable host lookups for -proxy and -onion parameters (Johnathan Corgan)

Tree-SHA512: 40f5ef3954721333e58d34653874d9f6ac5426c817762d132838f3b6f968ca5ca05aa56d02fd742cb5a8dc040f1a28dad6d54f667342eceba62fb2af18b58fc0
2017-03-03 16:22:22 +01:00
Wladimir J. van der Laan 67c5cc1917
Merge #9828: Avoid -Wshadow warnings in wallet_tests
09fe346 Avoid -Wshadow warnings in wallet_tests (Russell Yanofsky)

Tree-SHA512: 03a026787438efc9eba94299c2dd7de07a71ec7363b058b4f086d5ff0be844660fff2ef4f40e43d91313ea53de25f3de3c677b080b564d37f0693057498d3233
2017-03-03 16:08:50 +01:00
Wladimir J. van der Laan 75d012e8c7
Merge #8808: Do not shadow variables (gcc set)
ad1ae7a Check and enable -Wshadow by default. (Pavel Janík)
9de90bb Do not shadow variables (gcc set) (Pavel Janík)

Tree-SHA512: 9517feb423dc8ddd63896016b25324673bfbe0bffa97f22996f59d7a3fcbdc2ebf2e43ac02bc067546f54e293e9b2f2514be145f867321e9031f895c063d9fb8
2017-03-03 15:48:53 +01:00
MarcoFalke fa7da3fd96 [contrib] gh-merge: Move second sha512 check to before signing 2017-03-03 15:16:10 +01:00
Wladimir J. van der Laan ba80a684cf
Merge #9903: Docs: add details to -rpcclienttimeout doc
90a1d9a Docs: add details to -rpcclienttimeout doc (Ian Kelling)

Tree-SHA512: 7f9524f279a54b4d902674740d92624785abd54865aba82f7261151ceda50b5d51bf4d91c4fc0360168e190f8df890cc141bea5e1a9f4f2e62b8f9effda212cc
2017-03-03 14:57:02 +01:00
Wladimir J. van der Laan eb281842b7
Merge #8775: RPC refactoring: Access wallet using new GetWalletForJSONRPCRequest
d678771 Wallet: Sanitise -wallet parameter (Luke Dashjr)
9756be3 Wallet/RPC: Use filename rather than CWallet pointer, for lockwallet RPCRunLater job name (Luke Dashjr)
86be48a More tightly couple EnsureWalletIsAvailable with GetWalletForJSONRPCRequest where appropriate (Luke Dashjr)
a435632 Move wallet RPC declarations to rpcwallet.h (Luke Dashjr)
ad15734 RPC: Pass on JSONRPCRequest metadata (URI/user/etc) for "help" method (Luke Dashjr)
bf8a04a Reformat touched lines with C++11 (Luke Dashjr)
2e518e3 Move nWalletUnlockTime to CWallet::nRelockTime, and name timed task unique per CWallet (Luke Dashjr)
d77ad6d RPC: Do all wallet access through new GetWalletForJSONRPCRequest (Luke Dashjr)
eca550f RPC/Wallet: Pass CWallet as pointer to helper functions (Luke Dashjr)

Tree-SHA512: bfd592da841693390e16f83b451503eb5cedb71208089aa32b3fc45e973555584a3ed7696dd239f6409324464d565dacf0f3d0e36e8e13ae6a7843848465f960
2017-03-03 13:38:42 +01:00
Ian Kelling e5b449c3e8 Docs: correct and elaborate -rpcbind doc
The default was incorrect unless -rpcallowip was also specified.
2017-03-03 04:14:10 -08:00
Wladimir J. van der Laan 58861ad91b
Merge #9904: test: Fail if InitBlockIndex fails
6485466 test: Report InitBlockIndex result (Wladimir J. van der Laan)

Tree-SHA512: 8e1408aa8d56ec1873190f886af24aa68b0555ec4996b2b8a5a39a51ded58c8fba5843c07881ed33ab6dcb00e62c2322bcf2a6fb8f1083f77e0d93e7295ab938
2017-03-03 07:16:32 +01:00
MarcoFalke f7ec7cfd38
Merge #9359: Add test for CWalletTx::GetImmatureCredit() returning stale values.
7ed143c Add test for CWalletTx::GetImmatureCredit() returning stale values. (Russell Yanofsky)

Tree-SHA512: c95088ed6dfc5a0774ddaa2fe14ac0a9ebd830922a4d77100ec3d51fdeb6df40ad97de4f2ea970ed0f4122dcc0022ee1d43ab3c7188becd7f90c1c6af0ed39b7
2017-03-02 22:30:15 +01:00
Wladimir J. van der Laan 64854666f5 test: Report InitBlockIndex result
If InitBlockIndex fails, then it will segfault later. Same for the later
ActivateBestChain. BOOST_REQUIRE the result, so that an error will be
reported and the test case aborted.
2017-03-02 14:54:47 +01:00