Commit Graph

586 Commits

Author SHA1 Message Date
Adrian Gallagher
ccf37a45fe
Litecoin: Fix wallet_abandonconflict test 2018-07-23 18:12:30 -07:00
Adrian Gallagher
ad3c330972
Merge remote-tracking branch 'bitcoin/0.16' into HEAD 2018-07-23 16:53:43 -07:00
Ben Woosley
20461fc272
Fix that CWallet::AbandonTransaction would only traverse one level
Prior to this change, it would mark only the first layer of
child transactions abandoned, due to always following the input hashTx
rather than the current now tx.

Github-Pull: #13652
Rebased-From: 89e70f9d7fe384ef9de4fa3828d4c80523290186
Tree-SHA512: 403da0cc400a807e5a30038bd505881a68208c3f9e96ad5a7755e763666982bc3c19564ac13a5757612c8b6efc331fb2ad0edbaf7e830993b84bc64624423e54
2018-07-16 15:37:42 +02:00
Suhas Daftuar
b72c0bd4c9 [qa] Add a test for merkle proof malleation
Github-Pull: #13452
Rebased-From: d280617bf569f84457eaea546541dc74c67cd1e4
2018-07-13 12:23:39 -04:00
Suhas Daftuar
cfc6f7413b [rpcwallet] Clamp walletpassphrase value at 100M seconds
Larger values seem to trigger a bug on macos+libevent (resulting in the
rpc server stopping).

Github-Pull: #12905
Rebased-From: 662d19ff7217d0e6c7975ca311933f640955a53e
2018-07-12 10:03:03 -04:00
MarcoFalke
cbdabef35e qa: Fix wallet_listreceivedby race
Github-Pull: #13304
Rebased-From: fa865efa4a21ae08be8b4c390b7661182e0b415b
2018-07-12 10:03:02 -04:00
lmanners
79c4fff9ed [tests] Fixed intermittent failure in p2p_sendheaders.py.
Added handling for the case where headers are announced over more than one message.
refs #12453

Github-Pull: #13192
Rebased-From: 12d1b77f7eb2ca274890d9fb45d6c19a40ba8f74
2018-07-12 10:03:02 -04:00
Adrian Gallagher
dee12239d2
Litecoin: Branding 2018-06-17 19:01:58 -07:00
Adrian Gallagher
4c20019d30
Merge remote-tracking branch 'bitcoin/0.16' 2018-06-17 18:55:26 -07:00
Gregory Sanders
cbd2f70b75
expose CBlockIndex::nTx in getblock(header)
GitHub-Pull: #13451
Rebased-From: 86edf4a
2018-06-15 13:34:09 +08:00
MarcoFalke
08334b73be qa: Pad scriptPubKeys to get minimum sized txs
Github-Pull: #11423
Rebased-From: 364bae5f7a6b16eef63990154e48f19e7e693039
2018-05-24 14:17:50 -04:00
John Newbery
5ff571e90c
[wallet] [tests] Test disallowed multiwallet params
Add a test to check that bitcoind fails to start when specifying
-zapwallettxes, -salvagewallet and -upgradewallet when running in
multiwallet mode.

GitHub-Pull: #13030
Rebased-From: 1f83839
2018-05-18 14:09:34 +08:00
Suhas Daftuar
b8aacd660e
[qa] Handle disconnect_node race
Several tests call disconnect_nodes() on each node-pair in rapid
succession, resulting in a race condition if a node disconnects a peer
in-between the calculation of the nodeid's to disconnect and the
invocation of the disconnectnode rpc call.  Handle this.

GitHub-Pull: #13201
Rebased-From: 09c6699
2018-05-17 10:50:28 +08:00
John Newbery
e802c22947 [config] Remove blockmaxsize option
The blockmaxsize option was marked as deprecated in V0.15.1, and code
was added to convert provided blockmaxsize into blockmaxweight. However,
this code was incorrectly implemented, and blockmaxsize was silently
ignored.

No users have complained about blockmaxsize being ignored, so just
remove it in V0.17.

GitHub-Pull: #12756
Rebased-From: 4757c04
2018-04-26 23:43:54 +08:00
MarcoFalke
41c29f6d1d qa: Fix python TypeError in script.py
Github-Pull: #12475
Rebased-From: fa41d68a2e3f2148c3539a11b61ff835e3141c0d
2018-04-20 18:38:41 -04:00
Suhas Daftuar
7460945e0b [qa] Delete cookie file before starting node
If a cookie file exists in a datadir prior to node startup, it must have
been leftover from a prior unclean shutdown. As bitcoind will overwrite
it anyway, delete it before starting up to prevent the test framework
from inadvertently trying to connect using stale credentials.

Github-Pull: #12902
Rebased-From: 75d0e4c5444249f0cf81ed0494e2c2717170b695
2018-04-20 18:38:41 -04:00
MarcoFalke
0a76ed232a qa: Cache only chain and wallet for regtest datadir
Github-Pull: #12638
Rebased-From: fa2310572f4cfcd3322409ce7e37dde155fc4bc9
2018-04-20 18:38:41 -04:00
Suhas Daftuar
6c26df06ad [qa] Ensure bitcoind processes are cleaned up when tests end
Github-Pull: #12904
Rebased-From: e36a0c08529bccc695ec71a7ec1df89367cc1628
2018-04-20 18:38:41 -04:00
John Newbery
df38b130d9 [tests] Test starting bitcoind with -h and -version
Github-Pull: #12843
Rebased-From: 63048ec73d790ecbcfe3186f2520dac4460f56e3
2018-04-20 18:38:41 -04:00
John Newbery
4bdb0ce517 [tests] Fix intermittent rpc_net.py failure.
rpc_net.py would intermittently fail on Travis, probably
due to assuming that two consecutive RPC calls were atomic.
Fix this by only testing that amounts are bounded above and
below rather than equal.

Github-Pull: #12804
Rebased-From: 5a67c0524e5dc98d0e387f189545bc99863916d4
2018-04-20 18:38:41 -04:00
Ben Woosley
0e98f96e42 test: Use wait_until in tests where time was used for polling
Github-Pull: #12553
Rebased-From: 81b0822772169cb697b5994f49398e619d61a12d
2018-04-20 18:38:41 -04:00
Ben Woosley
1286f3e49a test: Use wait_until to ensure ping goes out
Intermittent failure evident here:
https://travis-ci.org/bitcoin/bitcoin/jobs/344021180

Github-Pull: #12545
Rebased-From: 0eb84f30d80847b7392ad42b2d916eaf5923a63c
2018-04-20 18:38:41 -04:00
Karl-Johan Alm
cfebd400ef [test] Round target fee to 8 decimals in assert_fee_amount
The output would produce arbitrary number of decimal points, sometimes resulting in 9 decimals:
AssertionError: Fee of 0.00000415 BTC too low! (Should be 0.000006175 BTC)
The above looks like the expected fee is 6175 sats when in reality it's 618.

Github-Pull: #12486
Rebased-From: 42e1b5d9797b65d3ce13a7cbace15fbedbcd4018
2018-04-20 14:58:48 -04:00
Xinxi Wang
3f8b8a6c5f
Litecoin: M prefix added for script addresses 2018-03-15 16:47:12 -07:00
Adrian Gallagher
32ee7c79ae
Litecoin: Fix tests 2018-03-15 15:57:27 -07:00
Adrian Gallagher
f117e96e0f
Litecoin: Adjust fee system 2018-03-15 15:57:22 -07:00
Adrian Gallagher
a74a01e617
Litecoin: Branding 2018-03-15 15:25:31 -07:00
Adrian Gallagher
fee6799b12
Litecoin: Protocol and default settings
0) Adjust BIP30 enforcement values

1) Reduce amount that peers can adjust our time to eliminate an attack vector. Thanks to
coblee for this fix.

2) Zeitgeist2 patch - thanks to Lolcust and ArtForz. This fixes an issue where a
51% attack can change difficulty at will. Go back the full period unless it's the
first retarget after genesis.

3) Avoid overflow in CalculateNextWorkRequired(). Thanks to pooler for the overflow fix.

4) Zeitgeist2 bool fshift bnNew.bits(). Thanks to romanornr for this path.

5) SegWit ContextualCheckBlockHeader adjustment and extra coverage.

6) Reject peer proto version below 70002. Thanks to wtogami for this patch.

7) Send final alert message to nodes warning about removal of the alert system. Thanks to coblee for this patch.

8) Adjust default settings for Litecoin.
2018-03-04 18:13:23 -08:00
Adrian Gallagher
e838c27971
Litecoin: Fix various tests 2018-02-26 18:57:17 -08:00
fivepiece
758a41e100
Bech32 addresses in dumpwallet
Output bech32 addresses in dumpwallet if address type is not as legacy

Github-Pull: #12315
Rebased-From: 45eea40aa88f047111a9b1151fe4d1bad5c560e2
Tree-SHA512: 3426292ddaeaafebc25fe84802011f5569a0cbb47fcc3209e7f00f64fc6eb1e637732722bbd02dce8d46be87d0f3687ce8370e71e9286bf7d00afc0a895faecb
2018-02-08 10:07:45 +01:00
Wladimir J. van der Laan
6c2788c7c8
test: Make ua_comment test pass on 0.16.0
The specific length of the uacomment is one shorter on `0.16.0` than on
`0.15.99` causing the (stupid) test to fail.
Just match the latter part of the message only.

Github-Pull: #12302
Rebased-From: aac6bce11219574e097a51da867e736c3d6ad96e
Tree-SHA512: 9edecbe2529584d6d01296ec153330bb44add8445fef139d7b7a667b86fef8ee3aafea55d95ac109c9fef079133709f69798477e3eba92744ea2f6c8f5acbb7d
2018-01-30 23:05:01 +01:00
Wladimir J. van der Laan
288deacdbe
Merge #12278: Add special error for genesis coinbase to getrawtransaction
ee11121 Add special error for genesis coinbase to gettransaction (MeshCollider)

Pull request description:

  Suggested by sipa here: https://botbot.me/freenode/bitcoin-core-dev/2018-01-23/?msg=96069825&page=2

  Just adds a special error message for the genesis block coinbase transaction when using `getrawtransaction`

Tree-SHA512: cd102c7983ec5457b299bff4b6db747d339fda157933a3ac54aec26b1e48b115aa68c1c9e6cb7a916f15c7786273ab558b2b20ab9768544d211e0ae9d1480e34
2018-01-30 09:59:28 +01:00
MeshCollider
ee11121229 Add special error for genesis coinbase to gettransaction 2018-01-30 11:36:25 +13:00
MarcoFalke
fa796bb695
qa: Add missing syncwithvalidationinterfacequeue to tests 2018-01-25 10:31:35 -05:00
John Newbery
1e2e09e2f6 Fix intermittent failure in p2p-versionbits-warning.py
Makes following changes to fix and tidy up p2p-versionbits-warning.py:
- add node alias in the run() method
- call versionbits_in_alert_file() in a wait_until loop.
- don't clear out the alert.txt file
- explicitly comment why the node needs to be stop-started
- Verify that the node is out of IBD after stop-start (nodes in IBD do
not generate alert messages)
- no need to subclass P2PInterface
2018-01-25 07:34:58 -05:00
John Newbery
3bbd843708 Improve comments/logging in p2p-versionbits-warning.py 2018-01-25 07:34:58 -05:00
John Newbery
ef2beb2c13 Fix flake8 warnings in p2p-versionbits-warning.py 2018-01-25 07:34:58 -05:00
Anthony Towns
6f881cc880 [tests] Remove EXPECTED_VIOLATION_COUNT 2018-01-25 09:44:30 +10:00
Anthony Towns
3150b3fea7 [tests] Rename misc functional tests. 2018-01-25 09:44:30 +10:00
Anthony Towns
81b79f2c39 [tests] Rename rpc_* functional tests. 2018-01-25 09:44:29 +10:00
Anthony Towns
61b8f7f273 [tests] Rename p2p_* functional tests. 2018-01-25 09:44:29 +10:00
Anthony Towns
90600bc7db [tests] Rename wallet_* functional tests. 2018-01-25 09:44:29 +10:00
Anthony Towns
ca6523d0c8 [tests] Rename feature_* functional tests. 2018-01-25 09:44:29 +10:00
Jonas Schnelli
7abb0f0929
Merge #12194: Add change type option to fundrawtransaction
16f6f59dc [qa] Test fundrawtransaction with change_type option (João Barbosa)
536ddeb17 [rpc] Add change_type option to fundrawtransaction (João Barbosa)
31dbd5af4 [wallet] Add change type to CCoinControl (João Barbosa)

Pull request description:

  Adds a new option `change_type` to `fundrawtransaction` RPC. This is useful to override the node `-changetype` argument.

  The new option is exclusive to `changeAddress` option, setting both raises a RPC error.

  See also #11403, #12119.

Tree-SHA512: 654686444f6125e37015a62f167064d54ec335701534988447be4687fa5ef9c7980a8a07cc0a03fff6ea6c4c1abf0f77a8843d535c4f3fe0bf93f968a4e676e6
2018-01-24 09:09:30 -10:00
João Barbosa
f523c6bec0 [qa] Use address type in addmultisigaddress to avoid addwitnessaddress 2018-01-24 16:23:55 +00:00
João Barbosa
16f6f59dcf [qa] Test fundrawtransaction with change_type option 2018-01-24 16:00:50 +00:00
Wladimir J. van der Laan
95941396ff
Merge #12119: [wallet] use P2WPKH change output if any destination is P2WPKH or P2WSH
596c446 [wallet] use P2WPKH change output if any destination is P2WPKH or P2WSH (Sjors Provoost)

Pull request description:

  If `-changetype` is not explicitly set, then regardless of `-addresstype`, the wallet will use a ~`bech32` change address~ `P2WPKH` change output if any destination is `P2WPKH` or `P2WSH`.

  This seems more intuitive to me and more in line with the spirit of [BIP-69](https://github.com/bitcoin/bips/blob/master/bip-0069.mediawiki).

  When combined with #11991 a QT user could opt to use `bech32` exclusively without having to figure out how to launch with `-changetype=bech32`, although so would #11937.

Tree-SHA512: 9238d3ccd1f3be8dfdd43444ccf45d6bdc6584ced3172a3045f3ecfec4a7cc8999db0cdb76ae49236492a84e6dbf3a1fdf18544d3eaf6d518e1f8bd241db33e7
2018-01-24 15:22:42 +01:00
MarcoFalke
126000ba9e
Merge #12089: qa: Make TestNodeCLI command optional in send_cli
fae7b14a04 qa: Make TestNodeCLI command optional in send_cli (MarcoFalke)
ffffb10a9f qa: Rename cli.args to cli.options (MarcoFalke)

Pull request description:

  Makes the `command` optional, since there are valid bitcoin-cli calls that have no `command`:

  * `bitcoin-cli -?`
  * `bitcoin-cli -getinfo`
  * ...

  Also, rename self.args to self.options, since that is the name in the `bitcoin-cli -help` documentation.

Tree-SHA512: f49c06024e78423301d70782946d47c0fb97a26876afba0a1f71ed329f5d7124aee4c2df520c7af74079bf9937851902f7be9c54abecc28dc29274584804d46c
2018-01-24 08:49:54 -05:00
Wladimir J. van der Laan
69ec021969
Merge #11415: [RPC] Disallow using addresses in createmultisig
1df206f Disallow using addresses in createmultisig (Andrew Chow)

Pull request description:

  This PR should be the last part of #7965.

  This PR makes createmultisig only accept public keys and marks the old functionality of accepting addresses as deprecated.

  It also splits `_createmultisig_redeemscript` into two functions, `_createmultisig_getpubkeys` and `_createmultisig_getaddr_pubkeys`. `_createmultisig_getpubkeys` retrieves public keys from the RPC parameters and `_createmultisig_getaddr_pubkeys` retrieves addresses' public keys from the wallet. `_createmultisig_getaddr_pubkeys` requires the wallet and is only used by `addwitnessaddress` (except when `createmultisig` is used in deprecated mode).

  `addwitnessaddress`'s API is also changed. Instead of returning just an address, it now returns the same thing as `createmultisig`: a JSON object with two fields, address and redeemscript.

Tree-SHA512: a5796e41935ad5e47d8165ff996a8b20d5112b5fc1a06a6d3c7f5513c13e7628a4fd37ec30fde05d8b15abfed51bc250710140f6834b13f64d0a0e47a3817969
2018-01-24 14:03:40 +01:00
MarcoFalke
fae7b14a04 qa: Make TestNodeCLI command optional in send_cli 2018-01-23 13:57:34 -05:00