Permalink
Switch branches/tags
Commits on Apr 17, 2018
  1. Merge #13004: Print to console by default when not run with -daemon

    laanwj committed Apr 17, 2018
    6a3b0d3 Print to console by default when not run with -daemon (Evan Klitzke)
    
    Pull request description:
    
      Cherry-picked ef6fa1c from the "up for grabs" PR: "Smarter default behavior for -printtoconsole" (#12689).
    
      See previous review in #12689.
    
    Tree-SHA512: 8923a89b9c8973286d53e960d3c464b1cd026cd5a5911ba62f9f972c83684417dc4004101815dfe987fc1e1baaec1fdd90748a0866bb5548e974d77b3135d43b
  2. Merge #12988: Hold cs_main while calling UpdatedBlockTip() signal

    laanwj committed Apr 17, 2018
    d86edd3 Hold cs_main while calling UpdatedBlockTip() and ui.NotifyBlockTip (Jesse Cohen)
    
    Pull request description:
    
      Resolves #12978
    
    Tree-SHA512: 2aed09434cd8dbf541ea75462070b73ee87ff31409bede210f6999ffee4a37e32202a289efd37609485d4cbdfe134fe4660a10bfb41e8a8acdba7cd0b61b8780
  3. Merge #12977: Refactor g_wallet_init_interface to const reference

    laanwj committed Apr 17, 2018
    6ec78f1 wallet: Refactor g_wallet_init_interface to const reference (João Barbosa)
    1936125 wallet: Make WalletInitInterface members const (João Barbosa)
    
    Pull request description:
    
    Tree-SHA512: c382156a38d4c6beaa6c48f911d7b314542b9500d88724b2b3029dae4491cb1e60e10628f6632d1366818ccf343f494650b3171593b5450149544ba198f49bb5
  4. Merge #12899: macOS: Prevent Xcode 9.3 build warnings

    jonasschnelli committed Apr 17, 2018
    2eb5036 macOS: Prevent Xcode 9.3 build warnings (Akio Nakamura)
    
    Pull request description:
    
      This PR intends to solve #12867
    
      1. clang (Apple LLVM version 9.1.0 (clang-902.0.39.1)) warns unused argument '-pie' during compilation. This parameter should pass to the linker, so use '-Wl,-pie' style in configure.ac.
      2. The other hand, when linking libbitcoinconsensus.la with passing '-Wl,-pie', ld warns that '-pie' being ignored because not link a main executable. So remove it from $libbitcoinconsensus_la_LDFLAGS in src/Makefile.am.
    
      - In order to apply this change to Makefile, you need to run autogen.sh and ./configure.
      - I think no need to add if-clause by target-os because also g++ can recognize/handle  '-Wl,-pie'.
      - I confirmed that the build was successful on macos10.13.4/XCode9.3 and ubuntu 17.10/g++7.2.0 and that warning was not issued.
    
    Tree-SHA512: 45b7c3881f3ad92172eb2ff6fa90c4dc70a42037450ea4b6fd87613b10c0aa90ebcffd54e7c50b70ba876b7c2e356825950fbf5a7a4e8e25118688d98d7b6ee0
  5. Print to console by default when not run with -daemon

    eklitzke authored and practicalswift committed Mar 27, 2018
    Printing to the debug log file can be disabled with -nodebulogfile
Commits on Apr 16, 2018
  1. Hold cs_main while calling UpdatedBlockTip() and ui.NotifyBlockTip

    skeees committed Apr 15, 2018
    Ensures that callbacks are invoked in the order in which the chain is updated
    Resolves #12978
  2. Merge #12972: Add python3 script shebang lint

    MarcoFalke committed Apr 16, 2018
    2bff472 [contrib] convert test-security-check to python3 (John Newbery)
    958bf40 add lint tool to check python3 shebang (practicalswift)
    
    Pull request description:
    
      base58.py can executed by python3
    
    Tree-SHA512: 30511204feefd4ccd5b4bf698fb88e516633e692dc95d31fe957b1c0c4879de25906355b28a5a0522171887315c8464a611e601ff00540db172d5bd463ee13d9
  3. Merge #11862: Network specific conf sections

    laanwj committed Apr 16, 2018
    c25321f Add config changes to release notes (Anthony Towns)
    5e3cbe0 [tests] Unit tests for -testnet/-regtest in [test]/[regtest] sections (Anthony Towns)
    005ad26 ArgsManager: special handling for -regtest and -testnet (Anthony Towns)
    608415d [tests] Unit tests for network-specific config entries (Anthony Towns)
    68797e2 ArgsManager: Warn when ignoring network-specific config setting (Anthony Towns)
    d1fc4d9 ArgsManager: limit some options to only apply on mainnet when in default section (Anthony Towns)
    8a9817d [tests] Use regtest section in functional tests configs (Anthony Towns)
    30f9407 [tests] Unit tests for config file sections (Anthony Towns)
    95eb66d ArgsManager: support config file sections (Anthony Towns)
    4d34fcc ArgsManager: drop m_negated_args (Anthony Towns)
    3673ca3 ArgsManager: keep command line and config file arguments separate (Anthony Towns)
    
    Pull request description:
    
      The weekly meeting on [2017-12-07](http://www.erisian.com.au/meetbot/bitcoin-core-dev/2017/bitcoin-core-dev.2017-12-07-19.00.log.html) discussed allowing options to bitcoin to have some sensitivity to what network is in use. @theuni suggested having sections in the config file:
    
          <cfields> an alternative to that would be sections in a config file. and on the
                    cmdline they'd look like namespaces. so, [testnet] port=5. or -testnet::port=5.
    
      This approach is (more or less) supported by `boost::program_options::detail::config_file_iterator` -- when it sees a `[testnet]` section with `port=5`, it will treat that the same as "testnet.port=5". So `[testnet] port=5` (or `testnet.port=5` without the section header) in bitcoin.conf and `-testnet.port=5` on the command line.
    
      The other aspect to this question is possibly limiting some options so that there is no possibility of accidental cross-contamination across networks. For example, if you're using a particular wallet.dat on mainnet, you may not want to accidentally use the same wallet on testnet and risk reusing keys.
    
      I've set this up so that the `-addnode` and `-wallet` options are `NETWORK_ONLY`, so that if you have a bitcoin.conf:
    
          wallet=/secret/wallet.dat
          upnp=1
    
      and you run `bitcoind -testnet` or `bitcoind -regtest`, then the `wallet=` setting will be ignored, and should behave as if your bitcoin.conf had specified:
    
          upnp=1
    
          [main]
          wallet=/secret/wallet.dat
    
      For any `NETWORK_ONLY` options, if you're using `-testnet` or `-regtest`, you'll have to add the prefix to any command line options. This was necessary for `multiwallet.py` for instance.
    
      I've left the "default" options as taking precedence over network specific ones, which might be backwards. So if you have:
    
          maxmempool=200
          [regtest]
          maxmempool=100
    
      your maxmempool will still be 200 on regtest. The advantage of doing it this way is that if you have `[regtest] maxmempool=100` in bitcoin.conf, and then say `bitcoind -regtest -maxmempool=200`, the same result is probably in line with what you expect...
    
      The other thing to note is that I'm using the chain names from `chainparamsbase.cpp` / `ChainNameFromCommandLine`, so the sections are `[main]`, `[test]` and `[regtest]`; not `[mainnet]` or `[testnet]` as might be expected.
    
      Thoughts? Ping @MeshCollider @laanwj @jonasschnelli @morcos
    
    Tree-SHA512: f00b5eb75f006189987e5c15e154a42b66ee251777768c1e185d764279070fcb7c41947d8794092b912a03d985843c82e5189871416995436a6260520fb7a4db
  4. Merge #12996: tests: Remove redundant bytes(…) calls

    MarcoFalke committed Apr 16, 2018
    9db48c5 tests: Remove redundant bytes² (practicalswift)
    
    Pull request description:
    
      This is a follow-up to #12993. As @jnewbery noted `bytes()` is idempotent.
    
    Tree-SHA512: 0eb25e0c2c46f9abaac30f964c5eb422bece1414c840a717d86794424294cb19d995a6db7c8df2a2f4ec84776b05274a637f2c111738f397051f510e57184752
  5. Merge #12987: tests/tools: Enable additional Python flake8 rules for …

    MarcoFalke committed Apr 16, 2018
    …automatic linting via Travis
    
    
    643aad1 Enable additional flake8 rules (practicalswift)
    f020aca Minor Python cleanups to make flake8 pass with the new rules enabled (practicalswift)
    
    Pull request description:
    
      Enabled rules:
    
      ```
      * E242: tab after ','
      * E266: too many leading '#' for block comment
      * E401: multiple imports on one line
      * E402: module level import not at top of file
      * E701: multiple statements on one line (colon)
      * E901: SyntaxError: invalid syntax
      * E902: TokenError: EOF in multi-line string
      * F821: undefined name 'Foo'
      * W293: blank line contains whitespace
      * W606: 'async' and 'await' are reserved keywords starting with Python 3.7
      ```
    
      Note to reviewers:
      * In general we don't allow whitespace cleanups to existing code, but in order to allow for enabling Travis checking for these rules a few smaller whitespace cleanups had to made as part of this PR.
      * Use [this `?w=1` link](https://github.com/bitcoin/bitcoin/pull/12987/files?w=1) to show a diff without whitespace changes.
    
      Before this commit:
    
      ```
      $ flake8 -qq --statistics --ignore=B,C,E,F,I,N,W --select=E112,E113,E115,E116,E125,E131,E133,E223,E224,E242,E266,E271,E272,E273,E274,E275,E304,E306,E401,E402,E502,E701,E702,E703,E714,E721,E741,E742,E743,F401,E901,E902,F402,F404,F406,F407,F601,F602,F621,F622,F631,F701,F702,F703,F704,F705,F706,F707,F811,F812,F821,F822,F823,F831,F841,W292,W293,W504,W601,W602,W603,W604,W605,W606 .
      5     E266 too many leading '#' for block comment
      4     E401 multiple imports on one line
      6     E402 module level import not at top of file
      5     E701 multiple statements on one line (colon)
      1     F812 list comprehension redefines 'n' from line 159
      4     F821 undefined name 'ConnectionRefusedError'
      28    W293 blank line contains whitespace
      ```
    
      After this commit:
    
      ```
      $ flake8 -qq --statistics --ignore=B,C,E,F,I,N,W --select=E112,E113,E115,E116,E125,E131,E133,E223,E224,E242,E266,E271,E272,E273,E274,E275,E304,E306,E401,E402,E502,E701,E702,E703,E714,E721,E741,E742,E743,F401,E901,E902,F402,F404,F406,F407,F601,F602,F621,F622,F631,F701,F702,F703,F704,F705,F706,F707,F811,F812,F821,F822,F823,F831,F841,W292,W293,W504,W601,W602,W603,W604,W605,W606 .
      $
      ```
    
    Tree-SHA512: fc7d5e752298a50d4248afc620ee2c173135b4ca008e48e02913ac968e5a24a5fd5396926047ec62f1d580d537434ccae01f249bb2f3338fa59dc630bf97ca7a
  6. Merge #12993: tests: Remove compatibility code not needed now when we…

    laanwj committed Apr 16, 2018
    …'re on Python 3
    
    
    b95f9a6 tests: Remove compatibility code not needed now when we're on Python 3 (practicalswift)
    
    Pull request description:
    
      Remove compatibility code not needed now when we're on Python 3.
    
    Tree-SHA512: adc6422794ee08ee8d4c69268e74f0d3eb97c7d3c26c9573698c3305572f20d4840cf9f79fd6fbbe367699bbd95533f90fb6d8569b9787f3f9ca20a3f4c75dd7
  7. Merge #12951: [doc] Fix comment in FindForkInGlobalIndex

    laanwj committed Apr 16, 2018
    0ef7b40 [doc] Fix comment in FindForkInGlobalIndex (James O'Beirne)
    
    Pull request description:
    
      The comment erroneously implies that we're searching `chainActive` for the
      first block common to `locator`, but we're using the parameter `chain`.
    
    Tree-SHA512: 42ba0fb378597820bdf1eaff1e3e284097baa312e7dd8448421c8c71aa91c353ea6c840860afcb7725f392431f3134d4feb271b96ab7058a62f84f48e468e714
  8. Merge #12986: Trivial: Corrected comment array name from pnSeeds6 to …

    laanwj committed Apr 16, 2018
    …pnSeed6
    
    
    d1b828b correcting the array name from pnSeeds6 to pnSeed6 (okayplanet)
    
    Pull request description:
    
      After reading this comment, I tried to grep the code base for `pnSeeds6` but couldn't find anything.  After some time wasted, I realized the arrays actually start with `pnSeed6`.
    
    Tree-SHA512: 78a66d96128267278c7b02dbc0c966a7447cb258c71b04be5a00de8ed10ee11437550bbbf7dd4208315a59d19408a31b62774ae6dbc521261818dece4970a602
Commits on Apr 14, 2018
  1. Merge #12946: depends: Fix Qt build with XCode 9.3

    laanwj committed Apr 14, 2018
    5b4fc3e depends: Fix Qt build with XCode 9.3 (fanquake)
    
    Pull request description:
    
      Building Qt with Xcode 9.3 is currently broken with:
      ```
      compiling kernel/qmacgesturerecognizer.cpp
      fontdatabases/mac/qfontengine_coretext.mm:775:20: error: qualified reference to 'QFixed' is a constructor name rather than a type in this context
          return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont)));
                         ^
      compiling .moc/moc_qfbscreen_p.cpp
      1 error generated.
      make[2]: *** [.obj/qfontengine_coretext.o] Error 1
      make[2]: *** Waiting for unfinished jobs....
    
      ```
      This patch should fix that, and will hopefully be the last time we have to patch Qt 5.7.
    
      I've only made minor adjustments from the [original patch](https://codereview.qt-project.org/#/c/224900/), so that it will apply, although still not completely cleanly. We can cleanup if required.
    
    Tree-SHA512: ad9e682081b9d2b0ccd4ea8e167ba15f1a903e39185a0cbfaa6608f1a45fcfb019e8726148fb301d65ddadaa23122825ccd6fdfc8de78767b653d5d1e47205da
  2. Merge #12973: Avoid std::locale/imbue madness in DateTimeStrFormat

    laanwj committed Apr 14, 2018
    1527015 Avoid std::locale/imbue in DateTimeStrFormat (Pieter Wuille)
    
    Pull request description:
    
      And replace them with just hardcoded ISO8601 strings and `gmtime_r`.
    
      Pointed out by @laanwj here: bitcoin#12970 (comment)
    
    Tree-SHA512: a459758b42ca56f8462115aefe8e6377c1319fce509ea64dbb767f3f087c9b848335954cb684e5896c38008847684045505a3e1559fb3e83b8e80e10b003d1e7
Commits on Apr 13, 2018
  1. Merge #11200: Allow for aborting rescans in the GUI

    jonasschnelli committed Apr 13, 2018
    ae1d2b0 Give an error when rescan is aborted by the user (Andrew Chow)
    69b01e6 Add cancel button to rescan progress dialog (Andrew Chow)
    
    Pull request description:
    
      A cancel button is added to the `showProgress` dialog that is used only for rescans. When clicked, `AbortRescan` is called directly to cancel the rescan.
    
      Rescans triggered from the debug console will now be cancelable by clicking the cancel button.
    
      Rescans triggered by a command (e.g. `importmulti`) will now give an error indicating that the rescan was aborted by the user (either by the `abortrescan` command or by clicking cancel).
    
    Tree-SHA512: 4bb14998766de686e2318fbc9805758eccf5dbe628a7257d072c9ae2fb4f61303a0876f49988d6e5eddb261969b8a307c81c0c2df0a42ae909a43d738af3dc1b
  2. Merge #12569: net: Increase signal-to-noise ratio in debug.log by adj…

    laanwj committed Apr 13, 2018
    …usting log level when logging failed non-manual connect():s
    
    
    cba2800 Increase signal-to-noise ratio in debug.log by adjusting log level when logging failed non-manual connect():s (practicalswift)
    
    Pull request description:
    
      Increase signal-to-noise ratio in `debug.log` by adjusting log level when logging failed non-manual `connect()`:s.
    
      Before this patch:
    
      ```
      $ src/bitcoind -printtoconsole
      …
      2018-02-28 18:42:51 UpdateTip: new best=0000000000005448b10a219683d34b770a28044e1cc421032dea1a79ff548948 height=1286903 version=0x20000000 log2_work=69.791313 tx=17408546 date='2018-02-28 18:42:46' progress=1.000000 cache=0.0MiB(173txo)
      2018-02-28 18:37:52 connect() 10.11.21.34:18333 failed after select(): Connection refused (111)
      2018-02-28 18:43:22 connect() to 10.11.43.14:18333 failed after select(): Network is unreachable (101)
      2018-02-28 18:44:49 UpdateTip: new best=000000000000029a521ff2803e1441b09413b876accff5084a4cccf7747d798b height=1286904 version=0x20000000 log2_work=69.791345 tx=17408559 date='2018-02-28 18:44:51' progress=1.000000 cache=0.1MiB(502txo)
      2018-02-28 18:46:54 connect() to [2001:0:9d38:78ff🔢1234🔢1234]:18333 failed: Network is unreachable (101)
      2018-02-28 18:48:56 connect() to [2001:0:9d38:6aff🔢1234🔢1234]:18333 failed: Network is unreachable (101)
      2018-02-28 18:49:11 UpdateTip: new best=000000000000000206b79eb235e5dd907b6369de0e5d764330bf40ec0d460311 height=1286905 version=0x20000000 log2_work=69.791377 tx=17408577 date='2018-02-28 18:49:12' progress=1.000000 cache=1.0MiB(5245txo)
      ```
    
      After this patch:
    
      ```
      $ src/bitcoind -printtoconsole
      …
      2018-02-28 18:42:51 UpdateTip: new best=0000000000005448b10a219683d34b770a28044e1cc421032dea1a79ff548948 height=1286903 version=0x20000000 log2_work=69.791313 tx=17408546 date='2018-02-28 18:42:46' progress=1.000000 cache=0.0MiB(173txo)
      2018-02-28 18:44:49 UpdateTip: new best=000000000000029a521ff2803e1441b09413b876accff5084a4cccf7747d798b height=1286904 version=0x20000000 log2_work=69.791345 tx=17408559 date='2018-02-28 18:44:51' progress=1.000000 cache=0.1MiB(502txo)
      2018-02-28 18:49:11 UpdateTip: new best=000000000000000206b79eb235e5dd907b6369de0e5d764330bf40ec0d460311 height=1286905 version=0x20000000 log2_work=69.791377 tx=17408577 date='2018-02-28 18:49:12' progress=1.000000 cache=1.0MiB(5245txo)
      ```
    
      Please note that "manual `connect()`:s" (invoked via `-connect`, `-proxy` or `addnode`) are still reported at the default log level as these messages are likely to be relevant to end-users:
    
      ```
      $ src/bitcoind -printtoconsole -connect=127.0.0.1:1234
      …
      2018-02-28 18:31:13 connect() to 127.0.0.1:1234 failed after select(): Connection refused (111)
    
      $ src/bitcoind -printtoconsole -proxy=127.0.0.1:1234
      …
      2018-02-28 18:32:32 connect() to 127.0.0.1:1234 failed after select(): Connection refused (111)
    
      $ src/bitcoind -printtoconsole &
      $ src/bitcoin-cli addnode 127.0.0.1:1234 onetry
      …
      2018-02-28 18:33:40 connect() to 127.0.0.1:1234 failed after select(): Connection refused (111)
      ```
    
    Tree-SHA512: 92e3c1e4b54ce8ccdd7ec31de147c8505710cd799ceb2bbc8576a086709967802403c9184df364b3cfa59bd98859f6ac8feb27fb09b9324194c6c47a042fc6d3
  3. Merge #12950: bitcoin-tx: Flatten for loop over one element

    laanwj committed Apr 13, 2018
    fa72f34 bitcoin-tx: Remove unused for loop (MarcoFalke)
    
    Pull request description:
    
      This flattens out a for loop and gets rid of the then unused vector `txVariants`.
    
    Tree-SHA512: 68081b313d846ce235a97a642c9d0097c3641350e819d6254001f332b053e41fa63ce49faca68120f5aaf5d5f4bfda104662eae781e2956d76a8915770344045
  4. Merge #12969: Drop dead code CScript::Find

    laanwj committed Apr 13, 2018
    8cbc5c4 Drop dead code CScript::Find (Ben Woosley)
    
    Pull request description:
    
      Last use removed in 922e8e2 (2012!)
    
    Tree-SHA512: d62daf2fc340a04c5f68990aa450d6738fadf4df6c50507fe02ecb62ae329b77db401719bf556a69f747408efdea5bc98af5e41ba82650b2f6d8b2d5489625e4
  5. Drop dead code CScript::Find

    Empact committed Apr 12, 2018
    Last use removed in 922e8e2 (2012!)
  6. Merge #12970: logging: bypass timestamp formatting when not logging

    sipa committed Apr 13, 2018
    339730a logging: bypass timestamp formatting when not logging (Cory Fields)
    
    Pull request description:
    
      As suggested by @laanwj on IRC:
      ```
      <cfields> whoa
      <cfields> Leaving test case "knapsack_solver_test"; testing time: 358694ms
      <cfields> i386 + old wine ^^
      <cfields> Leaving test case "knapsack_solver_test"; testing time: 6781ms
      <cfields> ^^ same, but with the LogPrint commented out
      ...
      <wumpus> if both log-to-file and log-to-console is disabled, it should probably bypass all logging
      ```
      Edit: The painful line commented out being the LogPrintf in CWallet::AddToWallet.
    
    Tree-SHA512: bc6da67dcdf05e9164fff7a7e9980de897e6f1b0d3f6e1ebde2162cbcba7d54a6ec94283534eb5a1ebde7134533d7fe7e496aa35ea3128c567ed6483eae5212c
  7. macOS: Prevent Xcode 9.3 build warnings

    AkioNak committed Apr 5, 2018
    This PR solves #12867 (needs to run autogen.sh && ./configure)
    
    clang (Apple LLVM version 9.1.0 (clang-902.0.39.1)) warns unused
    argument '-pie' during compilation.
    So we check for warnings in the test using $CXXFLAG_WERROR.
    
    Windows is alse default-pie and was special-cased because it also
    warned, but we can also eliminate that case if warnings are caught.
  8. Merge #12743: Fix csBestBlock/cvBlockChange waiting in rpc/mining

    sipa committed Apr 13, 2018
    4a6c0e3 Modernize best block mutex/cv/hash variable naming (Pieter Wuille)
    45dd135 Fix csBestBlock/cvBlockChange waiting in rpc/mining (Pieter Wuille)
    
    Pull request description:
    
      This is an alternative to #11694.
    
      It reintroduces a uint256 variable with the best block hash, protected by csBestBlock, and only updated while holding it.
    
      Also rename the involved variable to modern guidelines, as there are very few uses.
    
    Tree-SHA512: 826a86c7d3cee7fe49f99f4398ae99e81cb0563197eaeba77306a3ca6072b67cdb932bc35720fc0f99c2a57b218efa029d0b8bdfb240591a629b2e90efa3199d
Commits on Apr 12, 2018
  1. logging: bypass timestamp formatting when not logging

    theuni committed Apr 12, 2018
    This leads to massive speedups under Wine.