Commit graph

16673 commits

Author SHA1 Message Date
Pieter Wuille
f6dfb0f504 Reorder travis builds 2018-04-09 19:59:05 -04:00
Cory Fields
156db42c3f tests: run tests in parallel 2018-04-09 19:56:25 -04:00
Cory Fields
66f32551bd tests: split up actual tests and helper files 2018-04-09 19:55:49 -04:00
Wladimir J. van der Laan
5f0c6a7b0e
Merge #10244: Refactor: separate gui from wallet and node
9960137 Add developer notes about blocking GUI code (Russell Yanofsky)
9a61eed Use WalletBalances struct in Qt (Russell Yanofsky)
56f33ca Remove direct bitcoin calls from qt/sendcoinsdialog.cpp (Russell Yanofsky)
e872c93 Remove direct bitcoin access from qt/guiutil.cpp (Russell Yanofsky)
5884558 Remove direct bitcoin calls from qt transaction table files (Russell Yanofsky)
3cab2ce Remove direct bitcoin calls from qt/paymentserver.cpp (Russell Yanofsky)
3ec2ebc Remove direct bitcoin calls from qt/addresstablemodel.cpp (Russell Yanofsky)
827de03 Remove direct bitcoin calls from qt/coincontroldialog.cpp (Russell Yanofsky)
a0704a8 Remove most direct bitcoin calls from qt/walletmodel.cpp (Russell Yanofsky)
90d4640 Remove direct bitcoin calls from qt/optionsdialog.cpp (Russell Yanofsky)
582daf6 Remove direct bitcoin calls from qt/rpcconsole.cpp (Russell Yanofsky)
3034a46 Remove direct bitcoin calls from qt/bantablemodel.cpp (Russell Yanofsky)
e0b66a3 Remove direct bitcoin calls from qt/peertablemodel.cpp (Russell Yanofsky)
d7c2c95 Remove direct bitcoin calls from qt/intro.cpp (Russell Yanofsky)
fe6f27e Remove direct bitcoin calls from qt/clientmodel.cpp (Russell Yanofsky)
5fba3af Remove direct bitcoin calls from qt/splashscreen.cpp (Russell Yanofsky)
c2f672f Remove direct bitcoin calls from qt/utilitydialog.cpp (Russell Yanofsky)
3d619e9 Remove direct bitcoin calls from qt/bitcoingui.cpp (Russell Yanofsky)
c0f2756 Remove direct bitcoin calls from qt/optionsmodel.cpp (Russell Yanofsky)
71e0d90 Remove direct bitcoin calls from qt/bitcoin.cpp (Russell Yanofsky)
ea73b84 Add src/interface/README.md (Russell Yanofsky)

Pull request description:

  This is a refactoring PR that does not change behavior in any way. This change:

  1. Creates abstract [`Node`](https://github.com/ryanofsky/bitcoin/blob/pr/ipc-local/src/interface/node.h) and [`Wallet`](https://github.com/ryanofsky/bitcoin/blob/pr/ipc-local/src/interface/wallet.h) interfaces in [`src/interface/`](https://github.com/ryanofsky/bitcoin/tree/pr/ipc-local/src/interface)
  1. Updates Qt code to call the new interfaces. This largely consists of diffs of the form:

  ```diff
  -    InitLogging();
  -    InitParameterInteraction();
  +    node.initLogging();
  +    node.initParameterInteraction();
  ```

  This change allows followup PR #10102 (makes `bitcoin-qt` control `bitcoind` over an IPC socket) to work without any significant updates to Qt code. Additionally:

  * It provides a single place to describe the interface between GUI and daemon code.
  * It can make better GUI testing possible, because Node and Wallet objects have virtual methods that can be overloaded for mocking.
  * It can be used to help make the GUI more responsive (see https://github.com/bitcoin/bitcoin/issues/10504)

  Other notes:

  * I used python scripts [hide-globals.py](https://github.com/ryanofsky/home/blob/master/src/2017/hide-globals/hide-globals.py) and [replace-syms.py](https://github.com/ryanofsky/home/blob/master/src/2017/hide-globals/replace-syms.py) to identify all the places where Qt code was accessing libbitcoin global variables and calling functions accessing those global variables.
  * These changes were originally part of #10102. Thanks to @JeremyRubin for the suggestion of splitting them out.

  Commits:

  - [`ea73b84d2d` Add src/interface/README.md](ea73b84d2d)
  - [`71e0d90876` Remove direct bitcoin calls from qt/bitcoin.cpp](71e0d90876)
  - [`c0f2756be5` Remove direct bitcoin calls from qt/optionsmodel.cpp](c0f2756be5)
  - [`3d619e9d36` Remove direct bitcoin calls from qt/bitcoingui.cpp](3d619e9d36)
  - [`c2f672fb19` Remove direct bitcoin calls from qt/utilitydialog.cpp](c2f672fb19)
  - [`5fba3af21e` Remove direct bitcoin calls from qt/splashscreen.cpp](5fba3af21e)
  - [`fe6f27e6ea` Remove direct bitcoin calls from qt/clientmodel.cpp](fe6f27e6ea)
  - [`d7c2c95948` Remove direct bitcoin calls from qt/intro.cpp](d7c2c95948)
  - [`e0b66a3b7c` Remove direct bitcoin calls from qt/peertablemodel.cpp](e0b66a3b7c)
  - [`3034a462a5` Remove direct bitcoin calls from qt/bantablemodel.cpp](3034a462a5)
  - [`582daf6d22` Remove direct bitcoin calls from qt/rpcconsole.cpp](582daf6d22)
  - [`90d4640b7e` Remove direct bitcoin calls from qt/optionsdialog.cpp](90d4640b7e)
  - [`a0704a8996` Remove most direct bitcoin calls from qt/walletmodel.cpp](a0704a8996)
  - [`827de038ab` Remove direct bitcoin calls from qt/coincontroldialog.cpp](827de038ab)
  - [`3ec2ebcd9b` Remove direct bitcoin calls from qt/addresstablemodel.cpp](3ec2ebcd9b)
  - [`3cab2ce5f9` Remove direct bitcoin calls from qt/paymentserver.cpp](3cab2ce5f9)
  - [`58845587e1` Remove direct bitcoin calls from qt transaction table files](58845587e1)
  - [`e872c93ee8` Remove direct bitcoin access from qt/guiutil.cpp](e872c93ee8)
  - [`56f33ca349` Remove direct bitcoin calls from qt/sendcoinsdialog.cpp](56f33ca349)
  - [`9a61eed1fc` Use WalletBalances struct in Qt](9a61eed1fc)
  - [`9960137697` Add developer notes about blocking GUI code](9960137697)

Tree-SHA512: 7b9eff2f37d4ea21972d7cc6a3dbe144248595d6c330524396d867f3cd2841d666cdc040fd3605af559dab51b075812402f61d628d16cf13719335c1d8bf8ed3
2018-04-05 18:19:35 +02:00
Wladimir J. van der Laan
2b54155a45
Merge #12877: doc: Use bitcoind in Tor documentation
a5263fb doc: Use bitcoind in Tor documentation (Indospace.io)

Pull request description:

Tree-SHA512: 9440bb4dc3d4e43332d7e10bbba2fc88ce74f69c17777f5448556d5b0d572e3095fc284c80ba5669e02fa64c5f2fc2b911cc53c33cb67c44334afc405f2b77ba
2018-04-05 09:53:56 +02:00
Indospace.io
a5263fb511 doc: Use bitcoind in Tor documentation 2018-04-05 09:40:20 +02:00
Wladimir J. van der Laan
bd59c4395c
Merge #12859: Bugfix: Include <memory> for std::unique_ptr
a5bca13 Bugfix: Include <memory> for std::unique_ptr (Luke Dashjr)

Pull request description:

  Not sure why all these includes were missing, but it's breaking builds for some users:

  https://bugs.gentoo.org/show_bug.cgi?id=652142

  (Added to all files with a reference to `std::unique_ptr`)

Tree-SHA512: 8a2c67513ca07b9bb52c34e8a20b15e56f8af2530310d9ee9b0a69694dd05e02e7a3683f14101a2685d457672b56addec591a0bb83900a0eb8e2a43d43200509
2018-04-05 09:31:53 +02:00
Wladimir J. van der Laan
2fc94370f5
Merge #12887: [trivial] Add newlines to end of log messages.
5b10ab0 [trivial] Add newlines to end of log messages. (John Newbery)

Pull request description:

  Log messages should terminate with a '\n', or the following log will be
  written to the same line without a timestamp. Fix a couple of cases
  where the message is not terminated with a \n.

Tree-SHA512: 88677afe85c88ce9f58312430e8881916bd76bbc8cd353ff81c97b3de8356680503160992c0ef3ea192b4694e848e9ca2480dbc38fea1776903b3784497f1af6
2018-04-05 09:13:11 +02:00
MarcoFalke
9a2db3b3d5
Merge #11818: I accidentally [deliberately] killed it [the ComparisonTestFramework]
9c92c8c827 [tests] Remove Comparison Test Framework (John Newbery)
e80c640d78 [tests] Remove bip9-softforks.py (John Newbery)

Pull request description:

  Builds on #11772, #11773 and #11817. Please review those PRs first.

  Final step in #10603.

  - First commit removes bip9-softforks.py.  bip9-sofforks.py was intended to be a generic test for versionbits deployments. However, it only tests CSV activation and was not updated to test segwit activation. CSV activation is tested by bip68-112-113-p2p.py, so this test is duplicated effort. Rather than try to update it to use the BitcoinTestFramework, just remove it. (see https://github.com/btcdrak/bitcoin/pull/8 for previous discussion around the redundancy of bip9-softforks.py)
  - Second commit removes the now unused BitcoinComparisonFramework class and the comptool and blockstore modules.

Tree-SHA512: 4bb7196d521048b3b8ba95c87dde73005a1ac73d29ccbb869f11ce9a71089686e7eacd7335337853041dfbd3a5b110172b105adbada58779814d4db22b1376f5
2018-04-04 20:47:46 -04:00
Pieter Wuille
88430cbab4
Merge #12167: Make segwit failure due to CLEANSTACK violation return a SCRIPT_ERR_CLEANSTACK error code
1e747e3c1e Make segwit failure due to CLEANSTACK violation return a SCRIPT_ERR_CLEANSTACK error code. (Mark Friedenbach)

Pull request description:

  If a segwit script terminates with a stack size not equal to one, the current error code is EVAL_FALSE. This is semantically wrong, and prevents explicitly checking CLEANSTACK violations in the unit tests. This PR changes the error code (and affected unit tests) to use SCRIPT_ERROR_CLEANSTACK instead of SCRIPT_ERROR_EVAL_FALSE.

Tree-SHA512: 8f7b1650f7a23a942cde1070e3e56420be456b4a7be42515b237e95557bf2bd5e7ba9aabd213c8092bea28c165dbe73f5a3486300089aeb01e698151b42484b1
2018-04-04 17:30:24 -07:00
MarcoFalke
bfaed1ab2e
Merge #12460: Assert CPubKey::ValidLength to the pubkey's header-relevant size
f8c249ab91 Assert CPubKey::ValidLength to the pubkey's header-relevent size (Ben Woosley)

Pull request description:

  A pubkey's length is specific to its type which is indicated by its header value. GetLen returns the header-indicated length, so this change ensures that a key matches its header-indicated length.

  And replace some magic values with their constant equivalents.

Tree-SHA512: b727b39a631babe0932326396fc4d796ade8ec1e37454ff0c709ae9b78ecbd0cfdf59d84089ba8415e6efa7bc180e3cd39a14ddaf0871cbac54b96851e1b7b44
2018-04-04 17:50:32 -04:00
MarcoFalke
2106c4c64c
Merge #12853: qa: Match full plain text by default
faace13868 qa: Match full plain text by default (MarcoFalke)

Pull request description:

  Instead of escaping all full plain text error strings, just compare their strings by default.

Tree-SHA512: 42e28f55105eb947ac6af6ce4056f0ec0f701d85f1c2a38b35ab777bbdf2296bdb79639c345621b8adc03a98b28c7630ded9a67b8b04a48e2c3a49d598ecdcd7
2018-04-04 17:28:43 -04:00
MarcoFalke
dab0d6859b
Merge #12702: [wallet] [rpc] [doc] importprivkey: hint about importmulti
4e05687153 [wallet] [rpc] [doc] importprivkey: hint about importmulti (Karl-Johan Alm)

Pull request description:

  From #12701, a hint about `importmulti` inside the help for `importprivkey` seems useful.

Tree-SHA512: 09ddfd384062b4365f678167076cb9f5af1eb8f083714a20c2a9bb14fef1c886d1666196272bf09862537166d15ae89c3330cdc6836eee76cb54d137e53301df
2018-04-04 17:26:50 -04:00
MarcoFalke
648252e8ae
Merge #12851: travis: Run verify-commits only on cron jobs
fa6f12af6b travis: Run verify-commits only on cron jobs (MarcoFalke)

Pull request description:

  Since we skip travis builds on subsequent pushes (Auto Cancellation), there is no value in running verify-commits for non-cron jobs.

Tree-SHA512: a1a55c1f2877af30c1ad3ba27c7b7219317127871d49f526d2c773b21ddd022e4ad80ac4e59e690a7c91b6fed70a23a5868ee15fbf4074fd3363bc527b589c9e
2018-04-04 17:25:53 -04:00
Russell Yanofsky
9960137697 Add developer notes about blocking GUI code 2018-04-04 16:52:41 -04:00
Russell Yanofsky
9a61eed1fc Use WalletBalances struct in Qt
Suggested by John Newbery <john@johnnewbery.com>
https://github.com/bitcoin/bitcoin/pull/10244#discussion_r177504284
2018-04-04 16:52:41 -04:00
Russell Yanofsky
56f33ca349 Remove direct bitcoin calls from qt/sendcoinsdialog.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
e872c93ee8 Remove direct bitcoin access from qt/guiutil.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
58845587e1 Remove direct bitcoin calls from qt transaction table files 2018-04-04 16:52:40 -04:00
Russell Yanofsky
3cab2ce5f9 Remove direct bitcoin calls from qt/paymentserver.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
3ec2ebcd9b Remove direct bitcoin calls from qt/addresstablemodel.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
827de038ab Remove direct bitcoin calls from qt/coincontroldialog.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
a0704a8996 Remove most direct bitcoin calls from qt/walletmodel.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
90d4640b7e Remove direct bitcoin calls from qt/optionsdialog.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
582daf6d22 Remove direct bitcoin calls from qt/rpcconsole.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
3034a462a5 Remove direct bitcoin calls from qt/bantablemodel.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
e0b66a3b7c Remove direct bitcoin calls from qt/peertablemodel.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
d7c2c95948 Remove direct bitcoin calls from qt/intro.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
fe6f27e6ea Remove direct bitcoin calls from qt/clientmodel.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
5fba3af21e Remove direct bitcoin calls from qt/splashscreen.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
c2f672fb19 Remove direct bitcoin calls from qt/utilitydialog.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
3d619e9d36 Remove direct bitcoin calls from qt/bitcoingui.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
c0f2756be5 Remove direct bitcoin calls from qt/optionsmodel.cpp 2018-04-04 16:52:40 -04:00
Russell Yanofsky
71e0d90876 Remove direct bitcoin calls from qt/bitcoin.cpp 2018-04-04 16:52:37 -04:00
John Newbery
5b10ab0116 [trivial] Add newlines to end of log messages.
Log messages should terminate with a '\n', or the following log will be
written to the same line without a timestamp. Fix a couple of cases
where the message is not terminated with a \n.
2018-04-04 15:52:23 -04:00
Jonas Schnelli
1d540046fe
Merge #12870: make clean removes src/qt/moc_ files
2ebad11cf make clean removes src/qt/moc_ files (Sjors Provoost)

Pull request description:

  Prevents build errors when making e.g. the following switch:

  ```sh
  ./configure
  make
  make clean

  ./configure --with-gui=qt4
  make
  ```

Tree-SHA512: ec725dd6513e8d69398a4994f4b12a47f4e30401f421f8db7e398fca91b0f81bf9e4c566a23a37f229959f761daf6827a6d889f3b43faa05386ca083a8e392d7
2018-04-04 14:45:06 +03:00
MarcoFalke
ad960f5771
Merge #12846: [moveonly] Extract HelpRequested to dry up the help options testing
b386970d07 [moveonly] Extract HelpRequested to dry up the help options testing (Ben Woosley)

Pull request description:

  This ensures consistency across interfaces and makes the version handling more clear.

Tree-SHA512: d3f46d34dae6cf98902b0bbb279ada65c3215a25f69e5ff98b88e68f37a6b027ded265d15c12303998e31b390aa30fdb689455c61c983ab4b7527cbce8f4ec61
2018-04-03 11:52:21 -04:00
Russell Yanofsky
ea73b84d2d Add src/interface/README.md 2018-04-03 11:52:21 -04:00
Sjors Provoost
2ebad11cf9
make clean removes src/qt/moc_ files 2018-04-03 15:04:35 +02:00
Karl-Johan Alm
4e05687153
[wallet] [rpc] [doc] importprivkey: hint about importmulti 2018-04-03 11:53:06 +09:00
Ben Woosley
b386970d07
[moveonly] Extract HelpRequested to dry up the help options testing
This ensures consistency across interfaces and makes the version handling more clear.
2018-04-02 15:42:06 -07:00
MarcoFalke
c564424d98
Merge #12861: [tests] Stop feature_block.py from blowing up memory.
89fe5feea2 [tests] Stop feature_block.py from blowing up memory. (John Newbery)

Pull request description:

  The new P2PDataStore class was sending full blocks in headers messages,
  which meant that calls to send_blocks_and_test() would blow up memory if
  called with a large number of blocks. Fix that by only sending headers
  in headers messages.

  This means that python should use just over 1GB for feature_block.py (with bitcoind also using just over 1GB). That's the same as before the feature_block.py refactor.

Tree-SHA512: 796ea35584748ceb7b8fa36c732a461fb924dafe0b4c52d3eccf21a00fbdb65aef41ce1d91f027aad50cde6df5d30e985aaef474cb743975c06762975469cbbb
2018-04-02 17:41:11 -04:00
John Newbery
89fe5feea2 [tests] Stop feature_block.py from blowing up memory.
The new P2PDataStore class was sending full blocks in headers messages,
which meant that calls to send_blocks_and_test() would blow up memory if
called with a large number of blocks. Fix that by only sending headers
in headers messages.
2018-04-02 15:40:40 -04:00
Luke Dashjr
a5bca13095 Bugfix: Include <memory> for std::unique_ptr 2018-04-02 18:31:52 +00:00
John Newbery
9c92c8c827 [tests] Remove Comparison Test Framework 2018-04-02 14:04:07 -04:00
John Newbery
e80c640d78 [tests] Remove bip9-softforks.py
bip9-sofforks.py was intended to be a generic test for versionbits
deployments. However, it only tests CSV activation and was not updated
to test segwit activation. CSV activation is tested by
bip68-112-113-p2p.py, so this test is duplicated effort.

Rather than try to update it to use the BitcoinTestFramework, just
remove it.
2018-04-02 13:45:58 -04:00
Wladimir J. van der Laan
18815b4bfb
Merge #11742: rpc: Add testmempoolaccept
b55555d rpc: Add testmempoolaccept (MarcoFalke)

Pull request description:

  To check if a single raw transaction makes it into the current transaction pool, one had to call `sendrawtransaction`. However, on success, this adds the transaction to the mempool with no easy way to undo.

  The call `testmempoolaccept` is introduced to provide a way to solely check the result without changing the mempool state.

Tree-SHA512: 5afd9311190135cee8fc1f229c7d39bf893f1028f29e28d34f70df820198ff97b4bf86b41cbbd6e6c36a5c30073cefa92d541c74a4939c7a2a6fa283dfd41b63
2018-04-02 16:02:33 +02:00
Wladimir J. van der Laan
821980c00f
Merge #12857: Avoid travis lint-include-guards error
177b875 Avoid travis lint-include-guards error (Chun Kuan Lee)

Pull request description:

Tree-SHA512: 174c8bc2223dc3b317ab84cc09066eace229d58e061058f1d2fbf503c3587b79dc772e37afc18773379f92822fef4183652f27e9b1f6dc4abc4309af11c931e0
2018-04-02 14:42:40 +02:00
Chun Kuan Lee
177b875adc
Avoid travis lint-include-guards error 2018-04-02 16:42:21 +08:00
MarcoFalke
0c5f67b8e5
Merge #12757: Clarify include guard naming convention
3bcc0059b8 Add lint-include-guards.sh which checks include guard consistency (practicalswift)
8fd6af89a0 Fix missing or inconsistent include guards (practicalswift)
8af65d96f4 Document include guard convention (practicalswift)

Pull request description:

  * **Documentation**: Document include guard convention
  * **Fix**: Fix missing or inconsistent include guards
  * **Regression test**: Add `lint-include-guards.sh` which checks include guard consistency

Tree-SHA512: 8171878f60fd08ccbea943a11e835195750592abb9d7ab74eaa4265ae7fac523b1da9d31ca13d6ab73dd596e49986bfb7593c696e5f39567c93e610165bc2acc
2018-04-01 18:30:21 -04:00