aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-11-09Merge #11594: Improve -disablewallet parameter interactionWladimir J. van der Laan
7963335 Fix -disablewallet default value (João Barbosa) b411c2a Improve -disablewallet parameter interaction (João Barbosa) Pull request description: The first commit logs a message for each configured wallet if `-disablewallet` is set: ``` bitcoind -printtoconsole -regtest -disablewallet -wallet=foo -wallet=bar ... WalletParameterInteraction: parameter interaction: -disablewallet -> ignoring -wallet=foo WalletParameterInteraction: parameter interaction: -disablewallet -> ignoring -wallet=bar ``` It also moves up the `-disablewallet` check which avoids the unnecessary `-wallet` soft set. The second commit fixes the default value of `-disablewallet`, currently the value is correct, but it should use `DEFAULT_DISABLE_WALLET`. The third commit can be dropped or squashed, just took the opportunity to fix the coding style there. Tree-SHA512: bec13d2b2be5adf4680c77212020ed27dd05f15c4c73542d2005d91108bf704e2df1707ed2bec696e584ecd40eff7a63e25201fd70400222aa5a8da6aed6afeb
2017-11-09Merge #10529: Improve bitcoind systemd service fileWladimir J. van der Laan
16be7dd Improve bitcoind systemd service file (Florian Schmaus) Pull request description: Add comment how further options can be added or existing ones modified. Use /run/${RuntimeDirectory} for PID file. Remove TimeoutStopSec, TimeoutStartSec, StartLimitInterval, StartLimitBurst directives as those should be set indivdually. Remove Group to user the bitcoin user's default group. Changed Restart from 'always' to 'on-failure' (can also be overwritten individually). Tree-SHA512: f76674c11fd6e3faaf786aa05686926523d9c875aad6b776337f800108fdb716470286805c532b494f8cf713cb5eea6b735e1c7c238ffb407a5cc909dda41aa4
2017-11-09Merge #11221: Refactor: simpler readWladimir J. van der Laan
9db9d62 Refactor: make the read function simpler (gnuser) Pull request description: Tree-SHA512: 5a80cc1b841488323d421e6a40b245d149cab1988247aed6cc7468dcc042d3df15b6711f25e40ff16e03ac21de36adbaa1d8da61ccdb94f97c8b70c24a5eedc5
2017-11-09Merge #11552: Improve wallet-accounts testWladimir J. van der Laan
bc9c0a7 Improve wallet-accounts test (Russell Yanofsky) Pull request description: Add comments and - Verify sending to a account causes getaccountaddress to generate new addresses. - Verify sending to a account causes getreceivedbyaccount to return amount received. - Verify ways setaccount updates the accounts of existing addresses. Tree-SHA512: 4facc8d10fb23847081e8081839d4050faa855cca40f34012b82297bf1a8cfdb975b26314bc518dc6b3f5997452a7acf309f9627e0dff359347c628b37014bfa
2017-11-08Merge #11182: [tests] Add P2P interface to TestNodeMarcoFalke
32ae82f5c [tests] use TestNode p2p connection in tests (John Newbery) 5e5725cc2 [tests] Add p2p connection to TestNode (John Newbery) b86c1cd20 [tests] fix TestNode.__getattr__() method (John Newbery) Pull request description: Final two steps of #10082 : Adding the "mininode" P2P interface to `TestNode` This PR adds the mininode P2P interface to `TestNode`. It simplifies the process for opening a P2P connection to the node-under-test from this: ```python node0 = NodeConnCB() connections = [] connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], node0)) node0.add_connection(connections[0]) ``` to this: ```python self.nodes[0].add_p2p_connection(p2p_conn_type=NodeConnCB) ``` The first commit adds the infrastructure to `test_node.py`. The second updates the individual test cases to use it. Can be separated if this is too much review for one PR. Tree-SHA512: 44f1a6320f44eefc70489ae8350c6a16ad1a6035e4b9b7bafbdf19f5905ed0e2db85beaaf4758eec3059dd89a375a47a45352a029f39f57a86ab38a9ae66650e
2017-11-08Merge #11635: trivial: Fix typo – alreardy → alreadyMarcoFalke
7536b08c1 trivial: Fix typo – alreardy → already (practicalswift) Pull request description: Fix typo: alreardy → already. Tree-SHA512: b53f7540e516bb0a106873983aea8cb35f8e6690153b2c737ede79be7dae7b9e5f644859204ab6419de0f900ffac50bfdd775259b24ad8c12993b4c792fe836b
2017-11-08[tests] use TestNode p2p connection in testsJohn Newbery
2017-11-08[tests] Add p2p connection to TestNodeJohn Newbery
p2p connections can now be added to TestNode instances. This commit also updates the example test to use the new p2p interface in TestNode to demonstrate usage. A future commit will update the existing tests to use p2p through the TestNode.
2017-11-08[tests] fix TestNode.__getattr__() methodJohn Newbery
2017-11-08trivial: Fix typo – alreardy → alreadypracticalswift
2017-11-08Merge #11289: Add wallet backup text to import* and add* RPCsWladimir J. van der Laan
c098c58 Wrap dumpwallet warning and note scripts aren't dumped (MeshCollider) a38bfbc Add wallet backup text to import*, add* and dumpwallet RPCs (MeshCollider) Pull request description: Closes https://github.com/bitcoin/bitcoin/issues/11243 Adds "Requires a new wallet backup" text to `addwitnessaddress`, `importprivkey`, `importmulti`, `importaddress`, `importpubkey`, and `addmultisigaddress`. Also adds a warning to `dumpwallet` that backing up the seed alone is not sufficient to back up non-HD addresses Tree-SHA512: 76d7cdca54d5b458acf479154620322391b889922525fddd6153f4164cfee393ad743757400cb8f6b1b30f24947df68ea9043b4e509f7df77a8fa05dda370933
2017-11-08Merge #11524: [net] De-duplicate connection eviction logicWladimir J. van der Laan
5ce7cb9 [net] De-duplicate connection eviction logic (Thomas Snider) Pull request description: While reviewing the safeguards against deliberate node isolation on the network by malicious actors, I found a good de-duplication candidate. I think this form is much more legible (the type of `cutoffs` notwithstanding). ReverseCompareNodeTimeConnected is not included in the list since the cutoff size is a function of the remaining number of nodes in the candidate eviction set. Tree-SHA512: ed17999fa9250dcf8448329219324477117e4ecd2d41dedd72ad253e44630eef50b3232c420f1862ebbfb9b8c94efbba1a235b519e39ff5946865c7d69a75280
2017-11-08Merge #11562: bench: use std::chrono rather than gettimeofdayWladimir J. van der Laan
24a0bdd bench: prefer a steady clock if the resolution is no worse (Cory Fields) c515d26 bench: switch to std::chrono for time measurements (Cory Fields) Pull request description: gettimeofday has portability issues, see for example #11558. Regardless of large-scale clock refactors in the future, I think it's fine for bench to just use std::chrono itself. Note that this may slightly improve bench accuracy and changes the display from tiny floats to nanosecond counts instead. Tree-SHA512: 122355456d01ec6cfcf6867991715cf3a95eabbf5a4f2adc26a059b50382ffb318b7639cdd575197fc4ee5be8b967c0404f1f920d6f5bd4ddd0bd63b5e5c5632
2017-11-07[net] De-duplicate connection eviction logicThomas Snider
2017-11-07bench: prefer a steady clock if the resolution is no worseCory Fields
2017-11-07bench: switch to std::chrono for time measurementsCory Fields
std::chrono removes portability issues. Rather than storing doubles, store the untouched time_points. Then convert to nanoseconds for display. This allows for maximum precision, while keeping results comparable between differing hardware/operating systems. Also, display full nanosecond counts rather than sub-second floats.
2017-11-07Merge #11389: Support having SegWit always active in regtest (sipa, ajtowns, ↵MarcoFalke
jnewbery) d61845818 Have SegWit active by default (Pieter Wuille) 4bd89210a Unit tests for always-active versionbits. (Anthony Towns) d07ee77ab Always-active versionbits support (Pieter Wuille) 18e071841 [consensus] Pin P2SH activation to block 173805 on mainnet (John Newbery) 526023aa7 Improve handling of BIP9Deployment limits (Anthony Towns) Pull request description: Most tests shouldn't have to deal with the now-historical SegWit activation transition (and other deployments, but SegWit is certainly the hardest one to accomodate). This PR makes a versionbits starttime of -1 equal to "always active", and enables it by default for SegWit on regtest. Individual tests can override this by using the existing `-vbparams` option. A few unit tests and functional tests are adapted to indeed override vbparams, as they specifically test the transition. This is in preparation for wallet SegWit support, but I thought having earlier eyes on it would be useful. Tree-SHA512: 3f07a7b41cf46476e6c7a5c43244e68c9f41d223482cedaa4c02a3a7b7cd0e90cbd06b84a1f3704620559636a2268f5767d4c52d09c1b354945737046f618fe5
2017-11-07Merge #11597: [trivial] Fix error messages in CFeeBumperMarcoFalke
a02c5e459 [trivial] Fix error messages in CFeeBumper (Karl-Johan Alm) Pull request description: …pool fee rate. Tree-SHA512: c179853b2a19fdb767e46b29068f3e1ce6db75fda4356746472c93c5b51f0aa495a988c4da1e14762993d57229e525594a2e9d0e089f931c1c67fec7807bda54
2017-11-07Fix -disablewallet default valueJoão Barbosa
2017-11-07Improve -disablewallet parameter interactionJoão Barbosa
2017-11-07Merge #10866: Fix -Wthread-safety-analysis warnings. Compile with ↵Pieter Wuille
-Wthread-safety-analysis if available. 76ea17c79 Add mutex requirement for AddToCompactExtraTransactions(…) (practicalswift) 4616c825a Use -Wthread-safety-analysis if available (+ -Werror=thread-safety-analysis if --enable-werror) (practicalswift) 7e319d639 Fix -Wthread-safety-analysis warnings. Change the sync.h primitives to std from boost. (Matt Corallo) Pull request description: * Add mutex requirement for `AddToCompactExtraTransactions(…)`. * Use `-Wthread-safety-analysis` if available. * Rebased on top of https://github.com/TheBlueMatt/bitcoin/commits/2017-08-test-10923 - now includes: Fix -Wthread-safety-analysis warnings. Change the sync.h primitives to std from boost. Tree-SHA512: fb7365f85daa2741c276a1c899228181a8d46af51db7fbbdffceeaff121a3eb2ab74d7c8bf5e7de879bcc5042d00d24cb4649c312d51caba45a3f6135fd8b38f
2017-11-07Merge #11620: [build] .gitignore: add background.tiffMarcoFalke
4a110a009 [build] .gitignore: add background.tiff (Sjors Provoost) Pull request description: On OSX, running `make deploy` results in three files that were not covered by `.gitignore`: background.tiff background.tiff.png background.tiff@2x.png Tree-SHA512: cee7a6ebbc50f28bf588121902f6026ec08cf6516d9e56734dfc1b2d3f238e2db5bf87411f6a74b8bd06569f792789ac9f9046e6183f63fd675b953f24b060fc
2017-11-07Merge #11624: Docs: Change formatting for sequence of stepsMarcoFalke
d0b1fc88d Docs: Change formatting for sequence of steps (Vivek Ganesan) Pull request description: A numbered list is used when the sequence of steps matters. A bulleted list is used to denote a set of items where the sequence does not matter. The workflow is a sequence and hence changed to a numbered list. Reference: https://www.w3.org/wiki/HTML_lists#Ordered_lists Tree-SHA512: 310532713ed2dc3a5fe6d3b54f77fef09f355fa0ead57f2861c469e9149c658af4767cf00fb3e13569f6c4700edb0cc0265c2654c59393df80a99bf5123de5f5
2017-11-07Docs: Change formatting for sequence of stepsVivek Ganesan
A numbered list is used when the sequence of steps matters. A bulleted list is used to denote a set of items where the sequence does not matter. The workflow is a sequence and hence changed to a numbered list.
2017-11-07Merge #11626: rpc: Make `logging` RPC publicMarcoFalke
cabff7588 rpc: Make logging RPC public (Wladimir J. van der Laan) Pull request description: This started out as a developer hack but now it's useful enough for general use. Unhide the call by moving it to `control` category. This makes it documented in `help`. Tree-SHA512: f45fa378558b552d4e2a110bf85100b0eaaa6180bb5f62cb54a251f66026d4625b670c69d85c281eebbf4b56b80b65618c51a5a593b8f9d0a04b31e95adc91f4
2017-11-07Merge #11554: Sanity-check script sizes in bitcoin-txMarcoFalke
a6f33ea77 Sanity-check script sizes in bitcoin-tx (Matt Corallo) Pull request description: Tree-SHA512: bb8ecb628763af23816ab085758f6140920a6ff05dcb298129c2bbe584a02a759c700a05740eca77023292c98a5658b2a608fa27d5a948d183f87ed9ab827952
2017-11-07Merge #11618: rpc: Lock cs_main in blockToJSON/blockheaderToJSONMarcoFalke
a9b6ba0b7 Add missing cs_main locks when calling blockToJSON/blockheaderToJSON (practicalswift) Pull request description: `blockToJSON(...)` and `blockheaderToJSON(...)` read the variable `chainActive` which requires holding the mutex `cs_main`. So does `GetDifficulty(...)`. Tree-SHA512: bfb94f5e3238accbf6a4daddde49d53f1891c38ae9b07e25b3098c485747159258f64bb66a50e147b32beac601de89d9d04ff717b6c4f1460d329c90a53d3333
2017-11-07Merge #11585: addrman: Add missing lock in Clear() (CAddrMan)MarcoFalke
3ab545d7f addrman: Add missing lock in Clear() (CAddrMan) (practicalswift) Pull request description: Add missing lock in `Clear()` (`CAddrMan`). The variable `vRandom` is guarded by the mutex `cs`. **Note to reviewers:** Does this look correct? Should the lock cover the entire scope of the method, or should it be limited to cover only `std::vector<int>().swap(vRandom);`? Tree-SHA512: 8833f31beaed1728fa55b13ddf9e0b8e24e395931497329be2440ce1c5113ff02871707d40830260adabd30c4ea86088f5da5cf8a821150c0d820f50a2ce386a
2017-11-07Merge #11480: [ui] Add toggle for unblinding password fieldsWladimir J. van der Laan
ff35de8 [ui] Add toggle for unblinding password fields (Thomas Snider) Pull request description: Proposed change for adding the ability to toggle password visibility in the password dialog. This is similar to functionality in most password managers and is specifically added with the use case of password managers in mind - the password in that case is likely pasted twice into both the new password and confirm password fields. If this is a welcome change, I am open to suggestions on rearranging the layout. Tree-SHA512: 1823f356f8f941cc584c44de264433e9a573cb8a358efa300a412c4458b5564d8d193969be40859195cf9c8d6768eee895ee22440d51db4f09175f9b4e28bced
2017-11-07rpc: Make logging RPC publicWladimir J. van der Laan
This started out as a developer hack but now it's useful enough for general use. Unhide the call by moving it to `control` category. This makes it documented in `help`.
2017-11-07Add missing cs_main locks when calling blockToJSON/blockheaderToJSONpracticalswift
2017-11-06Have SegWit active by defaultPieter Wuille
2017-11-06Unit tests for always-active versionbits.Anthony Towns
2017-11-06Always-active versionbits supportPieter Wuille
2017-11-06[consensus] Pin P2SH activation to block 173805 on mainnetJohn Newbery
2017-11-06Improve handling of BIP9Deployment limitsAnthony Towns
Small tweaks by Pieter Wuille.
2017-11-06Add mutex requirement for AddToCompactExtraTransactions(…)practicalswift
The vector `vExtraTxnForCompact`, which is guarded by the mutex `cs_main`, is accessed in `AddToCompactExtraTransactions(…)`.
2017-11-06Use -Wthread-safety-analysis if available (+ -Werror=thread-safety-analysis ↵practicalswift
if --enable-werror)
2017-11-06Fix -Wthread-safety-analysis warnings. Change the sync.h primitives to std ↵Matt Corallo
from boost. Commit 1. This code was written by @TheBlueMatt in the following branch: * https://github.com/TheBlueMatt/bitcoin/commits/2017-08-test-10923 This commit message was written by me (@practicalswift) who also squashed @TheBlueMatt's commits into one and tried to summarize the changes made. Commit 2. Remove boost include. Remove boost mentions in comments.
2017-11-06[build] .gitignore: add background.tiffSjors Provoost
2017-11-06Merge #11611: [build] Don't fail when passed --disable-lcov and lcov isn't ↵Wladimir J. van der Laan
available 223a4aa [build] Don't fail when passed --disable-lcov and lcov isn't available (fanquake) Pull request description: Fixes #10828 As pointed out in #10828, failing with "lcov not found" when we've been passed --disable-lcov doesn't make sense. Master currently behaves like this (where lcov isn't available): ``` ./configure --disable-lcov checking for pkg-config... /usr/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes configure: error: "lcov testing requested but lcov not found" ``` cc @janstary Tree-SHA512: 606fdbddae67e72fff175f2f34e2c9af4e6972d40d5e1ec5c5d8be5051a728e5b16c35cfd856da0c0ce81dcab9db154a4937b1a6ca1e0233b6e160f2f4362002
2017-11-05Merge #11607: Add Gitian PGP key: SjorsJonas Schnelli
41b15cfc9 Add sjors gitian key (Sjors Provoost) Pull request description: First Gitian PR: bitcoin/gitian.sigs#603 Tree-SHA512: 02ac643b31a47724bb06a80f00ca10b3f128aa4337e59e34161d6d2281f2882b1a834b3e4769de15fc3cea76616cf25b17e85026507c8f242f21b93744b4fe70
2017-11-05[build] Don't fail when passed --disable-lcov and lcov isn't availablefanquake
2017-11-04Add sjors gitian keySjors Provoost
2017-11-03[trivial] Fix error messages in CFeeBumperKarl-Johan Alm
2017-11-02Merge #11560: Connect to a new outbound peer if our tip is staleWladimir J. van der Laan
6262915 Add unit test for stale tip checking (Suhas Daftuar) 83df257 Add CConnmanTest to mutate g_connman in tests (João Barbosa) ac7b37c Connect to an extra outbound peer if our tip is stale (Suhas Daftuar) db32a65 Track tip update time and last new block announcement from each peer (Suhas Daftuar) 2d4327d net: Allow connecting to extra outbound peers (Suhas Daftuar) Pull request description: This is an alternative approach to #11534. Rather than disconnect an outbound peer when our tip looks stale, instead try to connect to an additional outbound peer. Periodically, check to see if we have more outbound peers than we target (ie if any extra peers are in use), and if so, disconnect the one that least recently announced a new block (breaking ties by choosing the newest peer that we connected to). Tree-SHA512: 8f19e910e0bb36867f81783e020af225f356451899adfc7ade1895d6d3bd5afe51c83759610dfd10c62090c4fe404efa0283b2f63fde0bd7da898a1aaa7fb281
2017-11-02Merge #11593: rpc: work-around an upstream libevent bugWladimir J. van der Laan
97932cd rpc: further constrain the libevent workaround (Cory Fields) 6b58360 rpc: work-around an upstream libevent bug (Cory Fields) Pull request description: A rare race condition may trigger while awaiting the body of a message. This may fix some reported rpc hangs/crashes. This work-around mimics what libevent does internally once a write has started, which is what usually happens, but not always due to the processing happening on a different thread: https://github.com/libevent/libevent/blob/e7ff4ef2b4fc950a765008c18e74281cdb5e7668/http.c#L373 Fixed upstream at: https://github.com/libevent/libevent/commit/5ff8eb26371c4dc56f384b2de35bea2d87814779 Tree-SHA512: b9fa97cae9da2a44101c5faf1e3be0b9cbdf722982d35541cf224be31430779c75e519c8ed18d06ab7487bfb1211069b28f22739f126d6c28ca62d3f73b79a52
2017-11-02rpc: further constrain the libevent workaroundCory Fields
The bug was introduced in 2.1.6-beta, versions before that don't need the workaround.
2017-11-02Merge #11590: [Wallet] always show help-line of wallet encryption callsMarcoFalke
720d9e8fa [Wallet] always show help-line of wallet encryption calls (Jonas Schnelli) Pull request description: We do currently show/hide the wallet encryption RPC calls from the help if the current wallet. In case of an encrypted wallet, `encryptwallet` is hidden and `walletpassphrasechange`, `walletpassphrasechange` and `walletlock` do appear in the help. This is no longer ideal in case of multiwallet due to the fact that one may want help infos in order to target a specific wallet. IMO its preferable to have a static help screen (show everything always). The currently show/hidden calls do handle the possible invalid encryption-state fine. Fixes #11588 Tree-SHA512: 513fecd15248a31361f5143685e8cdeb63dfd3fa7120828917e1db54d936dc3db60d48ce46efa5c3a563a48157fe962689879856eeeed53f904686b12aec204e
2017-11-02Add unit test for stale tip checkingSuhas Daftuar