Commit Graph

15502 Commits

Author SHA1 Message Date
Aaron Clauson 1cecea71ad doc: Specify required source location for Windows WSL builds
- Added steps to specify required source location for Windows WSL
  builds.
- Attempted to make the introduction and options for building on Windows
  clearer.
2017-11-17 14:31:05 +01:00
Wladimir J. van der Laan 99bc0b428b
Merge #11087: Diagnose unsuitable outputs in lockunspent().
28f8b66 Diagnose unsuitable outputs in lockunspent(). (Eelis)

Pull request description:

  Fixes #2667.

  This is a simplified version of pull request #3574, which was abandoned by its author.

  I added some tests as well.

Tree-SHA512: e63e00dec8b1b232079380183805cb0b0b18c78ea6bea769837949aab984689d7f68b2ccfe66b1873517b040b9e616ce0eb058575c3d4382aa8c26eebcf1f14e
2017-11-16 12:24:05 +01:00
Wladimir J. van der Laan 084f52f38d
Merge #11654: tests: Initialize recently introduced non-static class member lastCycles to zero in constructor
069215e Initialize recently introduced non-static class member lastCycles to zero in constructor (practicalswift)

Pull request description:

  Initialize recently introduced non-static class member `lastCycles` to zero in constructor.

  `lastCycles` was introduced in 3532818746 which was merged into master yesterday.

  Friendly ping  @laanwj :-)

Tree-SHA512: cb93b6a8f6e2e3b06cd05a635da95c84f3df64c21fc23fe82f98306ea571badc32040315b563e46ddb5203128226bc334269acd497beead5a5777c434060fd85
2017-11-16 11:49:42 +01:00
Wladimir J. van der Laan 66d46c7901
Merge #11699: [travis-ci] Only run linters on Pull Requests
ec85248 [travis-ci] Only run linters on Pull Requests (John Newbery)

Pull request description:

  Linters should only be run on pull request builds. Once bad code style
  has been merged into master, it's too late. Master and other branches
  should not fail to build because of linter warnings.

Tree-SHA512: f8e56e0c338db60110a67bdd39a5837b42e156180349a81a68a383a5adef07ecf7b4946c1565333b47edd2b1a70e52caf0600bdf448f6eb01fa47595e8df82c9
2017-11-16 11:48:44 +01:00
Wladimir J. van der Laan 3c098a8aa0
Merge #11651: refactor: Make all #includes relative to project root (laanwj, MeshCollider, ryanofsky)
7b91b5f Remove trailing whitespace causing travis failure (MeshCollider)
434f5a2 Recommend #include<> syntax in developer notes (Russell Yanofsky)
96b9281 refactor: Include obj/build.h instead of build.h (Wladimir J. van der Laan)
138016b test: refactor: Use absolute include paths for test data files (Wladimir J. van der Laan)
e7b3163 qt: refactor: Changes to make include paths absolute (Wladimir J. van der Laan)
0c71521 build: Remove -I for everything but project root (Wladimir J. van der Laan)
5b56ec9 qt: refactor: Use absolute include paths in .ui files (Wladimir J. van der Laan)
1a44534 scripted-diff: Replace #include "" with #include <> (ryanofsky) (MeshCollider)

Pull request description:

  Rebase of #11053

  Previously started by @laanwj, ACK'ed by promag, ryanofsky, jonasschnelli, and concept-ACK'ed by practicalswift and jnewbery. Thus should be almost RTM :)

Tree-SHA512: d8d25248309deb06a54686c4a6bafd290ba69dcd0df391a50d1caed2c22ff2659be442459bdd9d1fc3b6a1360ba0804a907b1402d206df3e1cb6e8924e3c7f3e
2017-11-16 09:33:10 +01:00
MarcoFalke 54aedc0137
Merge #11686: Make ISSUE_TEMPLATE a bit shorter, mention hardware tests
ea3f363aa Make ISSUE_TEMPLATE a bit shorter, mention hardware tests (Matt Corallo)

Pull request description:

  Kinda getting tired of "block checksum mismatch error" issues on RPis that dont even have heatsinks...Also a shorter issue template might encourage people to actually read it.

Tree-SHA512: 943a286f6ea5c4f837a8dc3906342e1e428cf788d05ba9110f8005400d9775ae6f9cf3ce31ada201f5f7b95a6101314f2cb93f49dd92e242fbcea00aaae9e6e6
2017-11-15 17:41:20 -05:00
John Newbery ec85248c48 [travis-ci] Only run linters on Pull Requests
Linters should only be run on pull request builds. Once bad code style
has been merged into master, it's too late. Master and other branches
should not fail to build because of linter warnings.
2017-11-15 17:20:07 -05:00
MarcoFalke f0c1f8abb0
Merge #11690: [trivial] Fix the StartupWMClass for bitoin-qt, so gnome-shell can recognize it
b077fe908 fix the StartupWMClass for bitoin-qt, so gnome-shell can recognize it (Evan Klitzke)

Pull request description:

  I spent some time trying to figure out how to get the provided `.desktop` file to work correctly in GNOME. When a non-absolute path is used in the desktop file, you need to specify `StartupWMClass` in order for gnome-shell to know that a running application matches one in its desktop database. I also set a version and removed the deprecated `Encoding` field. With these changes, the desktop file passes `desktop-file-validate` cleanly.

  P.S. I found this while working on a new spec file for Bitcoin, which you can find here: https://github.com/eklitzke/bitcoin-copr/blob/master/bitcoin.spec . I plan to contribute this work back upstream as well, once I've figured out more of these packaging issues (desktop files being one of them!).

Tree-SHA512: cb290dd2c2fbcf7f08d838cf911d516d09a4e978d939e719a21a84db7232d1f534043616d7fbb52edd2b7d12389e5f0f8e53d29ac59d7282bdebde8224a2db7f
2017-11-15 16:39:23 -05:00
MeshCollider 7b91b5f8a4 Remove trailing whitespace causing travis failure 2017-11-16 08:23:03 +13:00
Russell Yanofsky 434f5a2506 Recommend #include<> syntax in developer notes 2017-11-16 08:23:03 +13:00
Wladimir J. van der Laan 96b92810a6 refactor: Include obj/build.h instead of build.h 2017-11-16 08:23:03 +13:00
Wladimir J. van der Laan 138016bf92 test: refactor: Use absolute include paths for test data files 2017-11-16 08:23:02 +13:00
Wladimir J. van der Laan e7b31631c7 qt: refactor: Changes to make include paths absolute
This makes all include paths in the GUI absolute.

Many changes are involved as every single source file in
src/qt/ assumes to be able to use relative includes.
2017-11-16 08:23:02 +13:00
Wladimir J. van der Laan 0c715214dd build: Remove -I for everything but project root
Remove -I from build system for everything but the project root,
and built-in dependencies.
2017-11-16 08:23:02 +13:00
Wladimir J. van der Laan 5b56ec969f qt: refactor: Use absolute include paths in .ui files 2017-11-16 08:23:02 +13:00
MeshCollider 1a445343f6 scripted-diff: Replace #include "" with #include <> (ryanofsky)
-BEGIN VERIFY SCRIPT-
for f in \
  src/*.cpp \
  src/*.h \
  src/bench/*.cpp \
  src/bench/*.h \
  src/compat/*.cpp \
  src/compat/*.h \
  src/consensus/*.cpp \
  src/consensus/*.h \
  src/crypto/*.cpp \
  src/crypto/*.h \
  src/crypto/ctaes/*.h \
  src/policy/*.cpp \
  src/policy/*.h \
  src/primitives/*.cpp \
  src/primitives/*.h \
  src/qt/*.cpp \
  src/qt/*.h \
  src/qt/test/*.cpp \
  src/qt/test/*.h \
  src/rpc/*.cpp \
  src/rpc/*.h \
  src/script/*.cpp \
  src/script/*.h \
  src/support/*.cpp \
  src/support/*.h \
  src/support/allocators/*.h \
  src/test/*.cpp \
  src/test/*.h \
  src/wallet/*.cpp \
  src/wallet/*.h \
  src/wallet/test/*.cpp \
  src/wallet/test/*.h \
  src/zmq/*.cpp \
  src/zmq/*.h
do
  base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-
2017-11-16 08:23:01 +13:00
MarcoFalke 4ed818060e
Merge #10600: Make feebumper class stateless
aed1d90ac [wallet] Change feebumper from class to functions (Russell Yanofsky)
37bdcca3c [refactor] Make feebumper namespace (Russell Yanofsky)
7c4f00919 [trivial] Rename feebumper variables according to project code style (Russell Yanofsky)

Pull request description:

  Make feebumper methods static and remove stored state in the class.

  Having the results of feebumper calls persist in an object makes process
  separation between Qt and wallet awkward, because it means the feebumper object
  either has to be serialized back and forth between Qt and wallet processes
  between fee bump calls, or that the feebumper object needs to stay alive in the
  wallet process with an object reference passed back to Qt. It's simpler just to
  have fee bumper calls return their results immediately instead of storing them
  in an object with an extended lifetime.

  In addition to making feebumper methods static, also:

  - Move LOCK calls from Qt code to feebumper
  - Move TransactionCanBeBumped implementation from Qt code to feebumper
  - Rename CFeeBumper class to FeeBumper (every CFeeBumper reference had to be
    updated in this PR anyway so this doesn't increase the size of the diff)

  This change was originally part of https://github.com/bitcoin/bitcoin/pull/10244

Tree-SHA512: bf75e0c741b4e9c8912e66cc1dedf0ff715f77ea65fc33f7020d97d9099b0f6448f5852236dac63eea649de7d6fc03b0b21492e2c5140fb7560a39cf085506fd
2017-11-15 12:50:17 -05:00
Wladimir J. van der Laan 927a1d7d08
Merge #10286: Call wallet notify callbacks in scheduler thread (without cs_main)
89f0312 Remove redundant pwallet nullptr check (Matt Corallo)
c4784b5 Add a dev notes document describing the new wallet RPC blocking (Matt Corallo)
3ea8b75 Give ZMQ consistent order with UpdatedBlockTip on scheduler thread (Matt Corallo)
cb06edf Fix wallet RPC race by waiting for callbacks in sendrawtransaction (Matt Corallo)
e545ded Also call other wallet notify callbacks in scheduler thread (Matt Corallo)
17220d6 Use callbacks to cache whether wallet transactions are in mempool (Matt Corallo)
5d67a78 Add calls to CWallet::BlockUntilSyncedToCurrentChain() in RPCs (Matt Corallo)
5ee3172 Add CWallet::BlockUntilSyncedToCurrentChain() (Matt Corallo)
0b2f42d Add CallFunctionInQueue to wait on validation interface queue drain (Matt Corallo)
2b4b345 Add ability to assert a lock is not held in DEBUG_LOCKORDER (Matt Corallo)
0343676 Call TransactionRemovedFromMempool in the CScheduler thread (Matt Corallo)
a7d3936 Add a CValidationInterface::TransactionRemovedFromMempool (Matt Corallo)

Pull request description:

  Based on #10179, this effectively reverts #9583, regaining most of the original speedups of #7946.

  This concludes the work of #9725, #10178, and #10179.

  See individual commit messages for more information.

Tree-SHA512: eead4809b0a75d1fb33b0765174ff52c972e45040635e38cf3686cef310859c1e6b3c00e7186cbd17374c6ae547bfbd6c1718fe36f26c76ba8a8b052d6ed7bc9
2017-11-15 16:25:40 +01:00
Wladimir J. van der Laan aca77a4d58
Merge #11655: net: Assert state.m_chain_sync.m_work_header in ConsiderEviction
63c2d83 Explicitly state assumption that state.m_chain_sync.m_work_header != nullptr in ConsiderEviction (practicalswift)

Pull request description:

  Explicitly state assumption that `state.m_chain_sync.m_work_header != nullptr` in `ConsiderEviction(…)`.

  Static analyzer (and humans!) will see the null-check in ...

  ```
  else if (state.m_chain_sync.m_timeout == 0 || (state.m_chain_sync.m_work_header != nullptr && ...
  ```

  ... and infer that `state.m_chain_sync.m_work_header` might be set to `nullptr` when reaching `else if (state.m_chain_sync.m_timeout > 0 && time_in_seconds > state.m_chain_sync.m_timeout)` and thus flag `state.m_chain_sync.m_work_header->GetBlockHash().ToString()` as a potential null pointer dereference.

  This commit makes the tacit assumption of `state.m_chain_sync.m_work_header != nullptr` explicit.

  Code introduced in 5a6d00c6de ("Permit disconnection of outbound peers on bad/slow chains") which was merged into master four days ago.

  Friendly ping @sdaftuar :-)

Tree-SHA512: 32e5631025b7ba7556a02c89d040fbe339c482a03f28d0dbc9871c699e1f8ac867619b89c5fd41fdcfcf0dc4d7c859295b26ccd988572145cc244261aec18ce9
2017-11-15 13:55:40 +01:00
Evan Klitzke b077fe908e fix the StartupWMClass for bitoin-qt, so gnome-shell can recognize it 2017-11-15 00:07:52 -08:00
Jonas Schnelli 4db82b7aab
Merge #11680: [docs] Add instructions for lcov report generation
5ff01c236 [docs] Add instructions for lcov coverage report generation (James O'Beirne)

Pull request description:

  After rediscovering the `lcov` report generation recipe one too many times, it seemed prudent to write some doc.

Tree-SHA512: 20e1b5f51ecd39e14bd67986a2c1578fb7da03a50625366eaca35b201db66aef99cd4a5456df3aaca5d2d66b18ed7d2e8eb8f3bd9c7aaf9af48164d9bac38931
2017-11-14 21:29:08 -10:00
James O'Beirne 5ff01c2363 [docs] Add instructions for lcov coverage report generation 2017-11-14 15:29:45 -08:00
MarcoFalke 3bdf242fc6
Merge #11677: qa: Remove unused NodeConn members
fafdad0d4 qa: Remove unused NodeConn members (MarcoFalke)

Pull request description:

  * `ver_send` and `ver_recv` were completely unused
  * `rpc` was only used once, in p2p-segwit. Imo better only pass it to the constructor in that single test

Tree-SHA512: 7f85554d6d0fd2096516ca3c608811d5370da66cde35d8031bdc921607a7a4efdb26355896012f75f713f8df09e28d46ba46be69fd96a5898fabb1a25cbcb8ad
2017-11-14 17:44:09 -05:00
Matt Corallo ea3f363aa0 Make ISSUE_TEMPLATE a bit shorter, mention hardware tests 2017-11-14 12:50:55 -05:00
Wladimir J. van der Laan 6d4821b693
Merge #11684: trivial: Fix typo – "Ubutntu" → "Ubuntu"
d8ac893 trivial: Fix typo – "Ubutntu" → "Ubuntu" (practicalswift)

Pull request description:

  Fix typo – "Ubutntu" → "Ubuntu".

Tree-SHA512: 80441cc5bf8b3547c8e5d923cac24af6869d12a626c59f2e7573dd0652e540f8bdb32def318523d84e2856a3c8a32797f761092bfdcdc2600b30d603cdfa2ce7
2017-11-14 12:59:27 +01:00
practicalswift d8ac893268 trivial: Fix typo – "Ubutntu" → "Ubuntu" 2017-11-14 10:23:41 +01:00
Wladimir J. van der Laan 7adeea3b0f
Merge #11641: qa: Only allow disconnecting all NodeConns
faaa7db qa: Only allow disconnecting all NodeConns (MarcoFalke)

Pull request description:

  Disconnecting the connection with `index=0` makes no sense when there are more than one connections, as the list "rotates around" and populates index 0 after `del`.

  Just disconnect all NodeConns in any case.

Tree-SHA512: e5cf540823fccb31634b5a11501f54222be89862e80ccafc28bc06726480f8d2153b8c1b6f859fa6a6d087876251d48a6c6035bccdaaf16831e300bc17ff613d
2017-11-14 08:56:37 +01:00
Wladimir J. van der Laan cbb54e77a1
Merge #11533: Docs: Update WSL installation notes for Fall Creators update
73a7e6d Update WSL installation for Fall Creators update (Thoragh)

Pull request description:

  Fall Creators update (RS3) was released 17 October and it has made some changes to the installation of WSL (no longer requires Developer Mode, out of beta and Ubuntu has to be installed from the Store).

Tree-SHA512: 65073dc787e249959ae6374bfb448fceb17fb2b85ddaaf198e37f7af5ecd905a896294a0acb0a16fe13a78e3fc4c0a3f8ae2637c01912d50ba8f8ece7e897208
2017-11-14 08:49:41 +01:00
Thoragh 73a7e6d186 Update WSL installation for Fall Creators update 2017-11-14 03:18:31 +01:00
MarcoFalke fafdad0d46 qa: Remove unused NodeConn members 2017-11-13 17:43:39 -05:00
MarcoFalke 5e468994fb
Merge #11676: contrib/init: Update openrc-run filename
2f041f0e7 contrib/init: Update openrc-run filename (Luke Dashjr)

Pull request description:

  OpenRC changed their program binary names in 2014 (3 years ago), and using the old names has loud warnings now

Tree-SHA512: 2b81802b21c32b8df6010142f9593c0b6cc814a052f83b7f5654f6885566e8dbcaf4da772145fa2cf5d94c16c2fb488c5d4879f71021407c4d7b3a3b7e7ed21e
2017-11-13 17:01:46 -05:00
practicalswift 069215ebe2 Initialize recently introduced non-static class member lastCycles to zero in constructor
lastCycles was introduced in 3532818746 which was merged into master yesterday.

Also initialize beginCycles to zero for consistency and completeness.
2017-11-13 22:37:13 +01:00
MarcoFalke faaa7db25e qa: Only allow disconnecting all NodeConns 2017-11-13 15:27:10 -05:00
MarcoFalke 41aa9c4a80
Merge #11663: [trivial] doc: Add getreceivedbyaddress release notes
fa0c7c7f8 doc: Add getreceivedbyaddress release notes (MarcoFalke)

Pull request description:

  C.f. #11055

  Also, remove release note snippets of previous versions.

Tree-SHA512: 3ec0722d2f69b24fdaddb65e3a602ffb79b986ae6910425d6c3639e250b88432885ac4cc738ec395ac80551e73dfc2cd59b2d2b6645c3986b97c4046ead27cbc
2017-11-13 14:57:26 -05:00
Luke Dashjr 2f041f0e7d contrib/init: Update openrc-run filename
OpenRC changed their program binary names in 2014 (3 years ago), and using the old names has loud warnings now
2017-11-13 15:46:25 +00:00
Wladimir J. van der Laan 927e5280bd
Merge #11035: [contrib] Add Valgrind suppressions file
4a426d8 Add note about Valgrind suppressions file in developer-notes.md (practicalswift)
84e2462 contrib: Add Valgrind suppressions file (practicalswift)

Pull request description:

  Includes known Valgrind warnings in our dependencies that cannot be fixed in-tree.

  Example use:

  ```
  $ valgrind --suppressions=contrib/valgrind.supp src/test/test_bitcoin
  $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \
        --show-leak-kinds=all src/test/test_bitcoin --log_level=test_suite
  ```

  Running with the suppressions file under Ubuntu 16.04:

  ```
  $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full --show-leak-kinds=all src/test/test_bitcoin --log_level=test_suite --run_test=wallet_crypto
  …
  ==10769== LEAK SUMMARY:
  ==10769==    definitely lost: 0 bytes in 0 blocks
  ==10769==    indirectly lost: 0 bytes in 0 blocks
  ==10769==      possibly lost: 0 bytes in 0 blocks
  ==10769==    still reachable: 0 bytes in 0 blocks
  ==10769==         suppressed: 72,704 bytes in 1 blocks
  ```

  Running without the suppressions file under Ubuntu 16.04:

  ```
  $ valgrind --leak-check=full --show-leak-kinds=all src/test/test_bitcoin --log_level=test_suite --run_test=wallet_crypto
  …
  ==10724== 72,704 bytes in 1 blocks are still reachable in loss record 1 of 1
  ==10724==    at 0x4C2DBF6: malloc (vg_replace_malloc.c:299)
  ==10724==    by 0x6F74EFF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21)
  ==10724==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
  ==10724==    by 0x40107CA: call_init (dl-init.c:30)
  ==10724==    by 0x40107CA: _dl_init (dl-init.c:120)
  ==10724==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
  ==10724==    by 0x2: ???
  ==10724==    by 0x1FFF0006D2: ???
  ==10724==    by 0x1FFF0006E8: ???
  ==10724==    by 0x1FFF0006FF: ???
  ==10724==
  ==10724== LEAK SUMMARY:
  ==10724==    definitely lost: 0 bytes in 0 blocks
  ==10724==    indirectly lost: 0 bytes in 0 blocks
  ==10724==      possibly lost: 0 bytes in 0 blocks
  ==10724==    still reachable: 72,704 bytes in 1 blocks
  ==10724==         suppressed: 0 bytes in 0 blocks
  ```

Tree-SHA512: 9c92079fc61313ea678deb6aaa16a3a71c3154c757459793eb9ca0d90a9a74c6faebfb04c9135e1b398ca34224fb7f03bd9c488ea0e8debf6894f69f030a31d3
2017-11-13 15:00:45 +01:00
Wladimir J. van der Laan 7fbf3c638f
Merge #11438: Updated Windows build doc for WSL/Xenial workaround
7383d77 Updated instructions for Windows 10 Fall Creators Update. (Aaron Clauson)
e0fc4a7 Updated Windows build doc for WSL/Xenial workarounds. (Aaron Clauson)

Pull request description:

  An update to the Windows build document that provides workarounds for the broken 64 bit mingw32 cross compiler on WSL/Xenial.

  This update is an alternative to pull request #11437. While that pull request takes a valid approach by stating building on WSL should be avoided I think it is more useful to give Windows developers a workaround option.

  The instructions have been tested on:
  - Ubuntu 14.04 and 64 bit mingw32 tool chain
  - Ubuntu 16.04 and 64 bit mingw32 tool chain
  - Ubuntu 17.04 and 64 bit mingw32 tool chain
  - Windows Subsystem for Linux (Windows 10 OS Build 15063.608) and 32 bit mingw32 tool chain
  - Windows Subsystem for Linux (Windows 10 OS Build 15063.608) and 64 bit mingw32 tool chain

  Related items:
  - Serious incompatibility problems w/ newer mingw-64 on Ubuntu #8653
  - `-fstack-protector-all` triggers crashes in mingw-w64 5.3.1 #8732
  - Windows build appears broken on WSL (buntu okay) #10269
  - Compilation error for windows target #11437

Tree-SHA512: 7c937e37ed7120ae5dcf61aba50e5228a7ed6f729647c724b8f48e7cbbd81366c1a83a818618766a8fe0418425e05ba2eba2b14f2616621c58606585444f45fc
2017-11-13 12:48:55 +01:00
practicalswift 4a426d8900 Add note about Valgrind suppressions file in developer-notes.md 2017-11-12 17:11:47 +01:00
MarcoFalke 2adbddb038
Merge #10749: Use compile-time constants instead of unnamed enumerations (remove "enum hack")
1e65f0f33 Use compile-time constants instead of unnamed enumerations (remove "enum hack") (practicalswift)

Pull request description:

  Use compile-time constants instead of unnamed enumerations (remove "enum hack").

Tree-SHA512: 1b6ebb2755398c5ebab6cce125b1dfc39cbd1504d98d55136b32703fe935c4070360ab3b2f52b1da48ba9f3b01082d204f3d87c92ccb5c8c333731f7f972e128
2017-11-11 18:07:28 -05:00
MarcoFalke 13e352dc53
Merge #3716: GUI: Receive: Remove option to reuse a previous address
927f4ff5a GUI: Receive: Remove option to reuse a previous address (Luke Dashjr)

Pull request description:

  This was justified by the need to "resent" an invoice, but now that we have the request history, that need should be gone.

Tree-SHA512: 4ade4eb84a21bbbd8dcc3a2c9580d416e113284b5bdf350c22051c233101fe0ee31659c54a7a46e7136f9c999acb61efbbb3f97aeb2fa7b2b1e1daec02ca0837
2017-11-11 13:29:52 -05:00
MarcoFalke fa0c7c7f86 doc: Add getreceivedbyaddress release notes
Also, remove release note snippets of previous versions.
2017-11-11 12:55:45 -05:00
MarcoFalke 95e14dc81d
Merge #11055: [wallet] [rpc] getreceivedbyaddress should return error if called with address not owned by the wallet
5e0ba8f8c [wallet] getreceivedbyaddress should return error if address is not mine (John Newbery)
ea0cd24f7 [tests] Tidy up receivedby.py (John Newbery)

Pull request description:

  Two commits:

  - First commit tidies up the `receivedby.py` test (and speeds it up by factor of two)
  - Second commit changes getreceivedbyaddress to return error if the address is not found in wallet, and adds test to `receivedby.py`

Tree-SHA512: e41342dcbd037a6b440cbe4ecd3b8ed589e18e477333f0d866f3564e948e0f5231e497d5ffb66da4e6680eb772d9f0cf839125098bb68b92d04a5ee35c6c0a81
2017-11-11 12:35:44 -05:00
Wladimir J. van der Laan 6de3203cdc
doc: Add historical release notes for 0.15.1
Tree-SHA512: 83d1b5c392ada61c846ece98e5060ead8b79989a024d241ade20b607af3651a832f59adc73d34771b4e9ec573315cb19ea20743d7d7d88dbbec0e60b2ca81729
2017-11-11 14:40:43 +01:00
Luke Dashjr 927f4ff5a2 GUI: Receive: Remove option to reuse a previous address
This was justified by the need to "resent" an invoice, but now that we have the request history, that need should be gone.
2017-11-11 07:51:08 +00:00
Pieter Wuille 033c78671b
Merge #11258: [rpc] Add initialblockdownload to getblockchaininfo
11413646b [trivial] (whitespace only) fix getblockchaininfo alignment (John Newbery)
bd9c18171 [rpc] Add initialblockdownload to getblockchaininfo (John Newbery)

Pull request description:

  Exposing whether the node is in IBD would help for testing, and may be useful in general, particularly for developers.

  First discussed in #10357 here: https://github.com/bitcoin/bitcoin/pull/10357#pullrequestreview-59963870

  > ... we could simplify this (and possibly other) tests by just adding a way to know if a node is in IBD. I'd like to do that, but I'm not sure it makes sense to complicate this PR with discussion over how that information should be made available. Eg it's not clear to me that the notion of being in IBD is worth exposing to the casual user, versus a hidden rpc call or something, since the definition has changed over time, and may continue to change in the future. But I still do agree that at least for testing purposes it would be far simpler to expose the field somehow...

   This PR currently implements the simplest way of doing this: adding an `initialblockdownload` field to `getblockchaininfo`. Other approaches we could take:

  1. add a new debug RPC method that exposes `IBD` and potentially other information.
  2. add a parameter to `getblockchaininfo`, eg `debug_info`, which would cause it to return debug information including IBD
  3. add a query string to the url `?debug=true` which would cause RPCs to return additional debug information.

  I quite like the idea of (3). Feedback on these and other approaches very much welcomed!

  @sdaftuar @laanwj

Tree-SHA512: a6dedd47f8c9bd38769cc597524466250041136feb33500644b9c48d0ffe4e3eeeb2587b5bbc6420364ebdd2667df807fbb50416f9a7913bbf11a14ea86dc0d4
2017-11-10 16:12:22 -08:00
Russell Yanofsky aed1d90aca [wallet] Change feebumper from class to functions
Change feebumper from a stateful class into a namespace of stateless
functions.

Having the results of feebumper calls persist in an object makes process
separation between Qt and wallet awkward, because it means the feebumper object
either has to be serialized back and forth between Qt and wallet processes
between fee bump calls, or that the feebumper object needs to stay alive in the
wallet process with an object reference passed back to Qt. It's simpler just to
have fee bumper calls return their results immediately instead of storing them
in an object with an extended lifetime.

In addition to making feebumper stateless, also:

- Move LOCK calls from Qt code to feebumper
- Move TransactionCanBeBumped implementation from Qt code to feebumper
2017-11-10 17:16:46 -05:00
Russell Yanofsky 37bdcca3c3 [refactor] Make feebumper namespace
Future commit will remove the FeeBumper class. This commit simply places
everything into a feebumper namespace, and changes the enum class name
from BumpeFeeResult to feebumper::Result.
2017-11-10 17:03:15 -05:00
Russell Yanofsky 7c4f009195 [trivial] Rename feebumper variables according to project code style
Future PRs will completely refactor this translation unit and touch all
this code so we rename the variables to follow project stlye guidelines
in this preparation commit.

Don't use m_ prefixes for member variables since we're going to remove
the class entirely in the next commits.
2017-11-10 17:01:41 -05:00
John Newbery 5e0ba8f8cd [wallet] getreceivedbyaddress should return error if address is not mine 2017-11-10 16:07:37 -05:00
MarcoFalke 61fb80660f
Merge #11269: [Mempool] CTxMemPoolEntry::UpdateAncestorState: modifySiagOps param type
203a4aa31 Fix CTxMemPoolEntry::UpdateAncestorState: modifySigOps param type int -> int64_t (donaloconnor)

Pull request description:

  CTxMemPoolEntry::CTxMemPoolEntry's modifySigOps parameter is int while update_ancestor_state::modifySigOpsCost is int64_t. This issue was raised in #11165. It looks like the function paramaters were not changed in commit 72abd2c

  This will avoid unexpected truncation of int64_t -> int

Tree-SHA512: 314c703f217e104336456859066d18fb0d12c4f9f32835e17490a6f29eb05951184095039e4e57edacef8ad35dd75c6d97d9af656a52209dd0c3779b4ffa0914
2017-11-10 15:33:30 -05:00