Commit Graph

300 Commits

Author SHA1 Message Date
Wladimir J. van der Laan
bf35424406 test: test utf-8 for labels in wallet 2016-05-31 04:31:20 +03:00
Wladimir J. van der Laan
5e02722d56 test: add ensure_ascii setting to AuthServiceProxy
Add a setting ensure_ascii to AuthServiceProxy. This setting,
defaulting to True (backwards compatible),
is passed through to json.dumps. If set to False, non-ASCII characters
>0x80 are not escaped. This is useful for testing server
input processing, as well as slightly more bandwidth friendly in case of
heavy unicode usage.
2016-05-31 04:31:15 +03:00
UdjinM6
6698d2ce89 Re-enable FillBlockPayee for mnpayments, fix CreateNewBlock calculations (#811)
* Reenable FillBlockPayee for mnpayments, fix CreateNewBlock calculations

* revert blockchain.py fix #772
2016-05-27 00:04:15 +02:00
UdjinM6
d11c6e7151 fix blockchain.py 2016-05-10 16:13:37 +03:00
UdjinM6
a4c098141a fix tests to follow #767 2016-05-10 16:12:21 +03:00
UdjinM6
31ff9c2ff8 Fix rpc-tests, relies on PRs #715-#719
Closes #720
2016-03-06 18:16:02 +01:00
UdjinM6
b3d1140800 more bitcoin->dash 2016-03-04 12:09:03 +03:00
UdjinM6
6ec64f8ff6 Merge remote-tracking branch 'bitcoin/0.12' into mergebtc0.12 2016-02-21 04:09:11 +03:00
mrbandrews
947c4ff724
[rpc-tests] Change solve() to use rehash
Github-Pull: #7468
Rebased-From: 7689041c03278a09c88a2bb78cd00217f6d4b1de
2016-02-10 20:39:52 +01:00
UdjinM6
a5ac60b868 Merge remote-tracking branch 'bitcoin/0.12' into HEAD
+ merge fixes
+ keepass on evhttp
2016-02-06 16:48:04 +03:00
Holger Schinzel
756c2d7a0d make RPC tests pass 2016-01-30 12:55:07 +01:00
Holger Schinzel
66ce5f1d60 fix test suite 2016-01-29 23:35:23 +01:00
Suhas Daftuar
e25b158ab8
RPC: indicate which transactions are replaceable
Add "bip125-replaceable" output field to listtransactions and gettransaction
which indicates if an unconfirmed transaction, or any unconfirmed parent, is
signaling opt-in RBF according to BIP 125.

Github-Pull: #7286
Rebased-From: eaa8d2754b48b62cdd07255fc3028feecad0c095
2016-01-20 13:50:58 +01:00
Suhas Daftuar
51af87f078
Fix error in blockchain.py introduced in merge
Github-Pull: #7373
Rebased-From: 4a0487937877484f14476716c3643de7a31c32da
2016-01-18 16:01:31 +01:00
James O'Beirne
351ffd8482
Fix help, add RPC tests for getblockheader
- Add assert_is_hex_string and assert_is_hash_string to RPC test utils.
- Add RPC documentation for getblockheader[chainwork].
- Add RPC tests for getblockheader.

Github-Pull: #7194
Rebased-From: 16d4fce0b203bdaa679ad5b3f1e6b6f46880d5d2 4745636126d9a4f28f701f701be392779815a7bf 135d6ec8cedc83ad800da45080c16d49e9182e80
2016-01-18 12:25:50 +01:00
MarcoFalke
d8b062d752
[qa] Fix pyton syntax in rpc tests
Github-Pull: #7335
Rebased-From: 7777994846cdb9b9cf69e391a33eeed30393bbcf
2016-01-18 10:46:46 +01:00
Wladimir J. van der Laan
1709cc5cb0
Merge pull request #7338
f17b00b release-notes: Combine NOP2->CLTV asm change into "RPC: Low-level API changes" section (Luke Dashjr)
e20704b Replace some instances of formatWithUnit with formatHtmlWithUnit (fanquake)
6f8346d qt5: Use the fixed font the system recommends (MarcoFalke)
605de4a Rename OP_NOP2 to OP_CHECKLOCKTIMEVERIFY. (mb300sd)
6191a9b [RPC-Tests] add option to run rpc test over QT clients (Jonas Schnelli)
6307beb Note that reviewers should mention the commit hash of the commits they reviewed. (Patrick Strateman)
6092ff2 Set link from http:// to https:// (Suriyaa Kudo)
2016-01-18 10:36:57 +01:00
Suhas Daftuar
1488fc8eac
Eliminate race condition in mempool_packages test
Github-Pull: #7368
Rebased-From: 4d10d2e16fb837abe304e0a5d3bc0a41941d917a
2016-01-18 10:29:32 +01:00
mb300sd
605de4a88a Rename OP_NOP2 to OP_CHECKLOCKTIMEVERIFY.
Github-Pull: #7213
Rebased-From: 37d271d7cce44885f835292ffe99b54399b014d6
2016-01-13 21:25:36 +00:00
Jonas Schnelli
6191a9b628 [RPC-Tests] add option to run rpc test over QT clients
Github-Pull: #7068
Rebased-From: 979698c1715ce86a98934e48acadbc936c95c9a3
2016-01-13 21:25:35 +00:00
Alex Morcos
fd4bd5009e
Add RPC call abandontransaction
- Make wallet descendant searching more efficient
- Add new rpc call: abandontransaction

Unconfirmed transactions that are not in your mempool either due to eviction or other means may be unlikely to be mined.  abandontransaction gives the wallet a way to no longer consider as spent the coins that are inputs to such a transaction.  All dependent transactions in the wallet will also be marked as abandoned.

- Add RPC test for abandoned and conflicted transactions.
- [Wallet] Call notification signal when a transaction is abandoned

Github-Pull: #7312
Rebased-From: 9e697172542e2b01517e4025df2c23d0ed5447f4 01e06d1fa365cedb7f5d5e17e6bdf0b526e700c5 df0e2226d998483d247c0245170f6b8ff6433b1d d11fc1695c0453ef22a633e516726f82717dd1d9
2016-01-13 15:55:00 +01:00
Alex Morcos
a36d79bfe2
Add sane fallback for fee estimation
- Always respect GetRequiredFee for wallet txs
- Add sane fallback for fee estimation
- SQUASHME: Fix rpc tests that assumed fallback to minRelayTxFee

Add new commandline option "-fallbackfee" to use when fee estimation does not have sufficient data.

Github-Pull: #7296
Rebased-From: 995b9f3 e420a1b bebe58b
2016-01-13 11:06:17 +01:00
Suhas Daftuar
d513405cb7
[Tests] Eliminate intermittent failures in sendheaders.py
- Add race-condition debugging tool to mininode
- Eliminate race condition in sendheaders.py test

Clear the last block announcement before mining new blocks.

Github-Pull: #7308
Rebased-From: 82a0ce09b45ab9c09ce4f516be5b9b413dcec470 168915e6dec88b31793d4ee4b60b94d4149de36c
2016-01-09 16:32:30 +01:00
MarcoFalke
1ed938b5fe
[qa] wallet: Check if maintenance changes the balance
- [qa] Cleanup wallet.py test
- [qa] check if wallet or blochchain maintenance changes the balance
- [walletdb] Add missing LOCK() in Recover() for dummyWallet

Github-Pull: #7229
Rebased-From: fa0765d433eb6d44a5cbec44f136b62814c663e5 fa14d994843fe2d700c977653cd3133d0a77cb67 fa33d9740c9b0d1071094ab6c1736f27a7090c95
2016-01-07 09:19:25 +01:00
MarcoFalke
333e1eaeea
Bump copyright headers to 2015
- Bump copyright headers to 2015
- [devtools] Rewrite fix-copyright-headers.py
- [devtools] Use git pretty-format for year parsing

Github-Pull: #7205
Rebased-From: fa6ad855e9159b2247da4fa0054f32fa181499ab fa24439ff3d8ab5b9efaf66ef4dae6713b88cb35 fa71669452e57039e4270fd2b33a0e0e1635b813
2016-01-05 14:13:33 +01:00
MarcoFalke
bdd0f9e286
[qa] Move gen_return_txouts() to util.py
Github-Pull: #7250
Rebased-From: fa0a9749eb09f6b537b98075241a7fcb46f758e3
2016-01-04 11:58:36 +01:00
Wladimir J. van der Laan
453c56701a
tests: Disable Tor interaction
This is unnecessary during the current tests (any test for Tor
interaction can explicitly enable it) and interferes with the proxy
test.

Github-Pull: #7170
Rebased-From: 4c40ec0451a8f279f3e2e40af068c9451afd699e
2015-12-22 16:45:56 +01:00
Jonas Schnelli
9ef7c54ef0 [Tests] Add mempool_limit.py test
- [Tests] Add mempool_limit.py test
- [Tests] Refactor some shared functions

Github-Pull: #7153
Rebased-From: 110ff1142c5284edba8aab77fcac0bea0e551969 7632cf689a9b959dd7a059b8b4a04761a4bc6e6a
2015-12-22 14:08:22 +01:00
Suhas Daftuar
301f16ad1c
Add more tests to p2p-fullblocktest
Github-Pull: #7226
Rebased-From: 9b41a5fba278e9ab56a9b86e7a5fe195dcad0b7a
2015-12-22 09:54:52 +01:00
Suhas Daftuar
12c469b236
[Mempool] Fix mempool limiting and replace-by-fee for PrioritiseTransaction
1) Fix mempool limiting for PrioritiseTransaction

Redo the feerate index to be based on mining score, rather than fee.

Update mempool_packages.py to test prioritisetransaction's effect on
package scores.

2) Update replace-by-fee logic to use fee deltas

3) Use fee deltas for determining mempool acceptance

4) Remove GetMinRelayFee

One test in AcceptToMemoryPool was to compare a transaction's fee
agains the value returned by GetMinRelayFee. This value was zero for
all small transactions.  For larger transactions (between
DEFAULT_BLOCK_PRIORITY_SIZE and MAX_STANDARD_TX_SIZE), this function
was preventing low fee transactions from ever being accepted.

With this function removed, we will now allow transactions in that range
with fees (including modifications via PrioritiseTransaction) below
the minRelayTxFee, provided that they have sufficient priority.

Github-Pull: #7062
Rebased-From: eb306664e786ae43d539fde66f0fbe2a3e89d910 9ef2a25603c9ec4e44c4f45c6a5d4e4386ec86d3 27fae3484cdb21b0d24face833b966fce5926be5 901b01d674031f9aca717deeb372bafa160a24af
2015-12-21 17:19:53 +01:00
Wladimir J. van der Laan
44fef99e66 net: Fix sent reject messages for blocks and transactions
Ever since we #5913 have been sending invalid reject messages
for transactions and blocks.

test: Add basic test for `reject` code

Extend P2P test framework to make it possible to expect reject
codes for transactions and blocks.

Github-Pull: #7179
Rebased-From: 9fc6ed6003da42f035309240c715ce0fd063ec03 20411903d7b356ebb174df2daad1dcd5d6117f79
2015-12-10 11:59:34 +01:00
Wladimir J. van der Laan
b2d7ada372
test: remove necessity to call create_callback_map
Remove necessity to call create_callback_map (as well as the function
itself) from the Python P2P test framework. Invoke the appropriate
methods directly.

- Easy to forget to call it and wonder why it doesn't work
- Simplifies the code
- This makes it easier to handle new messages in subclasses

Github-Pull: #7171
Rebased-From: 2f601d215da1683ae99ab9973219044c32fa2093
2015-12-07 12:45:14 +01:00
Gregory Maxwell
f31955d9da
Replace setInventoryKnown with a rolling bloom filter.
Github-Pull: #7133
Rebased-From: ec73ef37eccfeda76de55c4ff93ea54d4e69e1ec e20672479ef7f2048c2e27494397641d47a4d88d 6b849350ab074a7ccb80ecbef387f59e1271ded6 b6a0da45db8d534e7a77d1cebe382cd5d83ba9b8 d41e44c9accb3df84e0abbc602cc76b72754d382 aa4b0c26b0a94ca6164c441aae723e118554d214
2015-12-04 15:01:09 +01:00
Wladimir J. van der Laan
16f4a6e0fe
Merge pull request #7137
cfdc662 Explicitly set chain limits in replace-by-fee test (Suhas Daftuar)
2015-12-01 13:32:21 +01:00
Wladimir J. van der Laan
2ef5ffa59a
Merge pull request #6915
2d8860e Fix removeForReorg to use MedianTimePast (Suhas Daftuar)
b7fa4aa Don't call removeForReorg if DisconnectTip fails (Suhas Daftuar)
7e49f5f Track coinbase spends in CTxMemPoolEntry (Suhas Daftuar)
bb8ea1f removeForReorg calls once-per-disconnect-> once-per-reorg (Matt Corallo)
474b84a Make indentation in ActivateBestChainStep readable (Matt Corallo)
b0a064c Fix comment in removeForReorg (Matt Corallo)
9b060e5 Fix removal of time-locked transactions during reorg (Matt Corallo)
0c9959a Add failing test checking timelocked-txn removal during reorg (Matt Corallo)
2015-12-01 13:17:34 +01:00
Wladimir J. van der Laan
9afbd96919
Merge pull request #7022
50947ef Change default block priority size to 0 (Alex Morcos)
2015-12-01 12:39:34 +01:00
Suhas Daftuar
2b31ab90c4 Add rpc test for prioritisetransaction 2015-12-01 11:03:57 +01:00
Suhas Daftuar
6e8b07f5f3 Add rounding helper function to util.py 2015-12-01 11:03:37 +01:00
Wladimir J. van der Laan
30c2d8c635
Merge pull request #7105
9ac63d6 Keep track of explicit wallet conflicts instead of using mempool (Pieter Wuille)
2015-12-01 09:22:08 +01:00
Alex Morcos
50947ef23f Change default block priority size to 0
Make RPC tests have a default block priority size of 50000 (the old default) so we can still use free transactions in RPC tests.  When priority is eliminated, we will have to make a different change if we want to continue allowing free txs.
2015-11-30 16:16:24 -05:00
Gregory Maxwell
438ee59839
Merge pull request #7044
d52fbf0 Added additional config option for multiple RPC users. (Gregory Sanders)
2015-11-30 12:25:28 -08:00
Matt Corallo
0c9959a308 Add failing test checking timelocked-txn removal during reorg 2015-11-30 13:02:04 -05:00
Suhas Daftuar
cfdc66280f Explicitly set chain limits in replace-by-fee test 2015-11-30 12:35:24 -05:00
Wladimir J. van der Laan
a7751824ce
Merge pull request #7103
fa506c0 [wallet] Add rpc tests to verify fee calculations (MarcoFalke)
4b89f01 Default fPayAtLeastCustomFee to false (Ryan Havar)
2015-11-30 12:18:20 +01:00
Wladimir J. van der Laan
6fc287f2df
Merge pull request #7027
4ea1790 [qa] keypool: DRY: Use test framework (MarcoFalke)
c6973ca [qa] keypool: Fix white space to prepare transition to test framework (MarcoFalke)
2015-11-30 12:15:21 +01:00
Gregory Sanders
d52fbf00e3 Added additional config option for multiple RPC users. 2015-11-29 08:34:20 -05:00
Pieter Wuille
9ac63d6d30 Keep track of explicit wallet conflicts instead of using mempool 2015-11-29 13:24:02 +01:00
Suhas Daftuar
50262d8953 Allow block announcements with headers
This replaces using inv messages to announce new blocks, when a peer requests
(via the new "sendheaders" message) that blocks be announced with headers
instead of inv's.

Since headers-first was introduced, peers send getheaders messages in response
to an inv, which requires generating a block locator that is large compared to
the size of the header being requested, and requires an extra round-trip before
a reorg can be relayed.  Save time by tracking headers that a peer is likely to
know about, and send a headers chain that would connect to a peer's known
headers, unless the chain would be too big, in which case we revert to sending
an inv instead.

Based off of @sipa's commit to announce all blocks in a reorg via inv,
which has been squashed into this commit.

Rebased-by: Pieter Wuille
2015-11-29 11:59:23 +01:00
MarcoFalke
fa506c0c9b [wallet] Add rpc tests to verify fee calculations 2015-11-28 22:52:13 +01:00
Wladimir J. van der Laan
0e935865b9
Merge pull request #6871
63b5840 Fix usage of local python-bitcoinlib (Peter Todd)
16a2f93 Fix incorrect locking of mempool during RBF replacement (Peter Todd)
97203f5 Port test to rpc-test framework (Suhas Daftuar)
20367d8 Add test for max replacement limit (Suhas Daftuar)
73d9040 Improve RBF replacement criteria (Suhas Daftuar)
b272ecf Reject replacements that add new unconfirmed inputs (Peter Todd)
fc8c19a Prevent low feerate txs from (directly) replacing high feerate txs (Peter Todd)
0137e6f Add tests for transaction replacement (Peter Todd)
5891f87 Add opt-in full-RBF to mempool (Peter Todd)
2015-11-27 13:20:39 +01:00