Commit graph

851 commits

Author SHA1 Message Date
Patrick Lodder 294d408d70
pull-tester: don't hard depend on python 3.6
every script depends on "python3" not "python3.6"
2020-07-22 13:46:52 +02:00
Patrick Lodder cb49441a25
Fix ltc_scrypt dependency for RPC tests
- travis: RUN_TESTS requires python3-dev. This enables us to
  compile the ltc_scrypt library under python3
- pull tester deps: use curl instead of wget to reduce dependencies
  as everything else uses curl
2020-07-22 13:46:43 +02:00
langerhans 5d58c691ca Merge branch 'rnicoll-rnicoll/1.14-litecoin-scrypt' into 1.14-maint 2019-07-14 19:21:56 +02:00
Ross Nicoll dbfb33abe0 Revert behaviour change in getauxblock
Change getauxblock to respond with a "target" field instead of "_target".
2019-07-13 19:23:36 +00:00
Ross Nicoll 776c2b3d2c Update to litecoin_scrypt
The old ltc_scrypt module works on systems it is installed on, but does not
install on new systems it appears. Our README says to use litecoin_scrypt,
so updating the code to match.
2019-07-12 01:26:11 +00:00
Ross Nicoll 4dd8838b3a Rename binaries to match Dogecoin 2019-03-25 05:36:11 +00:00
Ross Nicoll e4f734dd40 Update tx output in p2p-fullblocktest.py (#1474)
* Update tx output in `p2p-fullblocktest.py` to match Dogecoin coin reward.
* Disable the re-org test as it disconnects the mini-node before the re-org completes.
2018-09-19 22:11:47 +01:00
Ross Nicoll 9c3a11b248 Clean up RPC tests (#1465)
* Enable full block tests
* Fix invalidblocktest
* Move watch only address funding to immediately before it's used, so node 0 doesn't spend the output before it checks it later.
* Fix `fundrawtransaction` tests and sanitize fee calculation at the same time
* Correct resolution of chain parameters when validating tx inputs, especially from previous coinbase transactions
* Set block versions on full block tests so that the generated blocks are AuxPoW compatible
2018-09-19 22:11:47 +01:00
Ross Nicoll b6b5ee7502 Update RPC tests for Dogecoin (#1431)
* Make most of the RPC tests pass
* Add AUXPoW rpc tests
- Tests the auxpow rpc interface `getauxblock`
- Tests consensus constraints for auxpow:
  - Minimum block height
  - Valid scrypt proof of work
  - Foreign chain ID
2018-09-19 22:11:47 +01:00
Ross Nicoll bc8cca4896 Merge AuxPoW support from Namecore
Changes are as below:

Wrap CBlockHeader::nVersion into a new class (CBlockVersion).  This allows to take care of interpreting the field into a base version, auxpow flag and the chain ID.

Update getauxblock.py for new 'generate' RPC call.

Add 'auxpow' to block JSON.

Accept auxpow as PoW verification.

Add unit tests for auxpow verification.

Add check for memory-layout of CBlockVersion.

Weaken auxpow chain ID checks for the testnet.

Allow Params() to overrule when to check the auxpow chain ID and for legacy blocks.  Use this to disable the checks on testnet.

Introduce CPureBlockHeader.

Split the block header part that is used by auxpow and the "real" block header (that uses auxpow) to resolve the cyclic dependency between the two.

Differentiate between uint256 and arith_uint256.

This change was done upstream, modify the auxpow code.

Add missing lock in auxpow_tests.

Fix REST header check for auxpow headers.

Those can be longer, thus take that into account.  Also perform the check actually on an auxpow header.

Correctly set the coinbase for getauxblock results.

Call IncrementExtraNonce in getauxblock so that the coinbase is actually initialised with the stuff it should be.  (BIP30 block height and COINBASE_FLAGS.)

Implement getauxblock plus regression test.

Turn auxpow test into FIXTURE test.

This allows using of the Params() calls.

Move CMerkleTx code to auxpow.cpp.

Otherwise we get linker errors when building without wallet.

Fix rebase with BIP66.

Update the code to handle BIP66's nVersion=3.

Enforce that auxpow parent blocks have no auxpow block version.

This is for compatibility with namecoind.  See also https://github.com/namecoin/namecoin/pull/199.

Move auxpow-related parameters to Consensus::Params.
2018-09-19 19:22:45 +01:00
Luke Dashjr e05799a381 Merge #10234, #10143 (fixes only), and #9853 via branch 'disconnect_ban_fixes-0.14' into 0.14.2_fixes 2017-06-05 22:57:27 +00:00
John Newbery ee1a60d156 [tests] update disconnect_ban.py test case to work with listbanned
Github-Pull: #10234
Rebased-From: d6732d832a
2017-06-05 22:56:22 +00:00
John Newbery 04226938a3 [tests] disconnect_ban: remove dependency on urllib
Github-Pull: #10143
Rebased-From: 5cc3ee24d2
2017-06-05 22:56:04 +00:00
John Newbery 98bd0c338b [tests] disconnect_ban: use wait_until instead of sleep
Github-Pull: #10143
Rebased-From: 12de2f252c
2017-06-05 22:55:10 +00:00
Luke Dashjr 99e5dbd0aa Merge #9853 via branch 'fixerrorcodes-0.14' into 0.14.2_fixes 2017-06-05 19:33:18 +00:00
Luke Dashjr 74653a41fe Merge #10196 via branch 'prioritisetx_gbtcache-0.14' into 0.14.2_fixes 2017-06-05 19:33:01 +00:00
John Newbery bfd1cf6713 [tests] disconnectban test - only use two nodes
Github-Pull: #10143
Rebased-From: 395561becf
2017-06-05 19:26:13 +00:00
John Newbery 5bc75bb8ee [tests] fix nodehandling.py flake8 warnings
Github-Pull: #10143
Rebased-From: d6564a26f4
2017-06-05 19:26:13 +00:00
John Newbery f5efe82a83 Return correct error codes in fundrawtransaction().
The fundrawtransaction() RPC was returning misleading or incorrect error
codes (for example RPC_INTERNAL_ERROR when funding the transaction
failed). This commit fixes those error codes:

- RPC_INTERNAL_ERROR should not be returned for application-level
errors, only for genuine internal errors such as corrupted data.

That error code has been replaced with RPC_WALLET_ERROR.

This commit also updates the test cases to explicitly test the error code.

Github-Pull: #9853
Rebased-From: dab804c18a
2017-06-05 19:01:16 +00:00
John Newbery 4943d7a9fe Return correct error codes in setban().
The setban() RPC was returning misleading or incorrect error
codes (for example RPC_CLIENT_NODE_ALREADY_ADDED when an invalid IP
address was entered). This commit fixes those error codes:

- RPC_CLIENT_INVALID_IP_OR_SUBNET should be returned if the client
  enters an invalid IP address or subnet.

This commit also updates the test cases to explicitly test the error code.

This commit also adds a testcase for trying to setban on an invalid subnet.

Github-Pull: #9853
Rebased-From: a012087667
2017-06-05 19:01:16 +00:00
John Newbery 18c109ddb1 Return correct error codes in removeprunedfunds().
The removeprunedfunds() RPC was returning misleading or incorrect error
codes (for example RPC_INTERNAL_ERROR when the transaction was
not found in the wallet). This commit fixes those error codes:

- RPC_INTERNAL_ERROR should not be returned for application-level
errors, only for genuine internal errors such as corrupted data.

This error code has been replaced with RPC_WALLET_ERROR.

This commit also updates the test cases to explicitly test the error code.

Github-Pull: #9853
Rebased-From: 960bc7f778
2017-06-05 19:01:16 +00:00
John Newbery fe51c8924e Return correct error codes in blockchain.cpp.
RPCs in blockchain.cpp were returning misleading or incorrect error
codes (for example getblock() returning RPC_INTERNAL_ERROR when the
block had been pruned). This commit fixes those error codes:

- RPC_INTERNAL_ERROR should not be returned for application-level
  errors, only for genuine internal errors such as corrupted data.
- RPC_METHOD_NOT_FOUND should not be returned in response to a
  JSON request for an existing method.

Those error codes have been replaced with RPC_MISC_ERROR or
RPC_INVALID_PARAMETER as appropriate.

Github-Pull: #9853
Rebased-From: c1190963b3
2017-06-05 19:01:16 +00:00
John Newbery 3ad00b4b32 Return correct error codes in bumpfee().
The bumpfee() RPC was returning misleading or incorrect error codes
(for example RPC_INVALID_ADDRESS_OR_KEY when the transaction was not
BIP125 replacable). This commit fixes those error codes:

- RPC_INVALID_ADDRESS_OR_KEY if an invalid address was provided:
    - Invalid change address given
- RPC_INVALID_PARAMETER if a single (non-address/key) parameter is incorrect
    - confTarget and totalFee options should not both be set.
    - Invalid confTarget
    - Insufficient totalFee (cannot be less than required fee)
- RPC_WALLET_ERROR for any other error
    - Transaction has descendants in the wallet
    - Transaction has descendants in the mempool
    - Transaction has been mined, or is conflicted with a mined transaction
    - Transaction is not BIP 125 replaceable
    - Transaction has already been bumped
    - Transaction contains inputs that don't belong to the wallet
    - Transaction has multiple change outputs
    - Transaction does not have a change output
    - Fee is higher than maxTxFee
    - New fee rate is less than the minimum fee rate
    - Change output is too small.

This commit also updates the test cases to explicitly test the error code.

Github-Pull: #9853
Rebased-From: 6d07c62322
2017-06-05 19:01:16 +00:00
Gregory Sanders 18476423fb
[Wallet] unset change position when there is no change on exact match 2017-05-31 10:57:16 +02:00
Suhas Daftuar 71463a7d18 [qa] Test prioritise_transaction / getblocktemplate interaction
Github-Pull: #10196
Rebased-From: 6a61424c9eed072ae8d79d68aac71f525c1608b5
2017-04-21 12:38:23 +00:00
Suhas Daftuar 39febb8c6d [qa] Fix mempool_packages.py for the 0.14 branch
The backport in d947afc0f7 of this
test was incorrect due to an api change in prioritisetransaction.
2017-04-05 08:30:51 -04:00
Suhas Daftuar d947afc0f7
Test prioritisetransaction and ancestor fee state
There is already a similar test for descendant fee state.

Github-Pull: #10144
Rebased-From: ba7dd8bf6f
2017-04-05 08:37:12 +02:00
Suhas Daftuar 2cd2cd51f7 Test transaction selection when gbt called without segwit support
Github-Pull: #9955
Rebased-From: c85ffe6d8d
2017-03-16 10:50:16 -04:00
Suhas Daftuar 569596cc51 Don't require segwit in getblocktemplate for segwit signalling or mining
Segwit's version bit will be signalled for all invocations of CreateNewBlock,
and not specifying segwit only will cause CreateNewBlock to skip transactions
with witness from being selected.

Github-Pull: #9955
Rebased-From: abe7b3d3ab
2017-03-16 10:43:54 -04:00
Russell Yanofsky eddaa6b35d
[qa] Make import-rescan.py watchonly check reliable
Send payments during the test from a different node than the node generating
keys to be imported, so the spending node doesn't create transactions that
inadvertently involve (spend funds from) the imported keys.

Fixes #9826

Github-Pull: #9839
Rebased-From: 864890adf5
2017-02-27 09:03:57 +01:00
MarcoFalke 260c71cbb8
qa: Check return code when stopping nodes
This includes work by jnewbery

Github-Pull: #9824
Rebased-From: fa4cd2e998
2017-02-23 10:40:55 +01:00
Russell Yanofsky 599c69abe3
Fix pruning test broken by 2 hour manual prune window
Regression happened in 91fb506 Add two hour buffer to manual pruning.

Github-Pull: #9820
Rebased-From: 874c7363d7
2017-02-23 10:39:20 +01:00
Luke Dashjr 861cb0c83d
QA: Test GBT size/weight limit values
Github-Pull: #9619
Rebased-From: 279f944e8d
2017-02-20 17:32:59 +01:00
Russell Yanofsky e662af3583 Use 2 hour grace period for key timestamps in importmulti rescans
Gregory Maxwell <greg@xiph.org> pointed out the lack of grace period in
https://github.com/bitcoin/bitcoin/pull/9490#issue-199407998.

The importwallet RPC which uses key timestamps in a similar way already has a 2
hour grace period.
2017-02-16 09:05:55 -05:00
Russell Yanofsky 38d3e9ee59 [qa] Extend import-rescan.py to test imports on pruned nodes. 2017-02-16 09:05:55 -05:00
Russell Yanofsky c28583d062 [qa] Extend import-rescan.py to test specific key timestamps 2017-02-16 09:05:55 -05:00
Russell Yanofsky 8be0866883 [qa] Simplify import-rescan.py
Get rid of partial functions so the test can be more easily extended to add
more variants of imports with options that affect rescanning (e.g. different
key timestamps).

Also change the second half of the test to send /to/ the imported addresses,
instead of /from/ the imported addresses. The goal of this part of the test was
to confirm that the wallet would pick up new transactions after an import
regardless of whether or not a rescan happened during the import. But because
the wallet can only do this reliably for incoming transactions and not outgoing
transactions (which require the wallet to look up transaction inputs) the test
previously was less meaningful than it should have been.
2017-02-16 09:05:55 -05:00
Wladimir J. van der Laan 1e92e041dd
Merge #9765: Harden against mistakes handling invalid blocks
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
2017-02-16 10:23:41 +01:00
Wladimir J. van der Laan 7a93af8340
Merge #9756: Return error when importmulti called with invalid address.
9acf25c Return error when importmulti called with invalid address. (Russell Yanofsky)
2017-02-15 16:29:16 +01:00
Suhas Daftuar ba803efb68 Harden against mistakes handling invalid blocks
Fixes a bug in AcceptBlock() in invoking CheckBlock() with incorrect
arguments, and restores a call to CheckBlock() from ProcessNewBlock()
as belt-and-suspenders.

Updates the (overspecified) tests to match behavior.
2017-02-15 08:17:57 -05:00
Wladimir J. van der Laan d8e8b06bd0
Merge #9108: Use importmulti timestamp when importing watch only keys (on top of #9682)
a80f98b Use importmulti timestamp when importing watch only keys (Russell Yanofsky)
a58370e Dedup nTimeFirstKey update logic (Russell Yanofsky)
2017-02-15 11:13:48 +01:00
Wladimir J. van der Laan e87ce95fbd
Merge #9720: net: fix banning and disallow sending messages before receiving verack
d943491 qa: add a test to detect leaky p2p messages (Cory Fields)
8650bbb qa: Expose on-connection to mininode listeners (Matt Corallo)
5b5e4f8 qa: mininode learns when a socket connects, not its first action (Matt Corallo)
cbfc5a6 net: require a verack before responding to anything else (Cory Fields)
8502e7a net: parse reject earlier (Cory Fields)
c45b9fb net: correctly ban before the handshake is complete (Cory Fields)
2017-02-14 14:42:29 +01:00
Wladimir J. van der Laan b08656e343
Merge #9715: Disconnect peers which we do not receive VERACKs from within 60 sec
66f861a Add a test for P2P inactivity timeouts (Matt Corallo)
b436f92 qa: Expose on-connection to mininode listeners (Matt Corallo)
8aaba7a qa: mininode learns when a socket connects, not its first action (Matt Corallo)
2cbd119 Disconnect peers which we do not receive VERACKs from within 60 sec (Matt Corallo)
2017-02-14 14:35:15 +01:00
Wladimir J. van der Laan edc9e63c57
Merge #9682: Require timestamps for importmulti keys
266a811 Use MTP for importmulti "now" timestamps (Russell Yanofsky)
3cf9917 Add test to check new importmulti "now" value (Russell Yanofsky)
442887f Require timestamps for importmulti keys (Russell Yanofsky)
2017-02-14 14:32:22 +01:00
Cory Fields d9434918d2 qa: add a test to detect leaky p2p messages
This is certainly not exhaustive, but it's better than nothing. Adds checks
for:

- Any message received before sending a version
- Any message received other than version/reject before sending a verack

It also tries to goad the remote into sending a pong, address, or block
announcement.
2017-02-13 18:56:03 -05:00
Matt Corallo 8650bbb660 qa: Expose on-connection to mininode listeners 2017-02-13 18:56:03 -05:00
Matt Corallo 5b5e4f8330 qa: mininode learns when a socket connects, not its first action 2017-02-13 18:56:03 -05:00
Russell Yanofsky 9acf25cc01 Return error when importmulti called with invalid address.
Lack of error checking noticed by Alex Morcos <morcos@chaincode.com>
2017-02-13 17:54:51 -05:00
Russell Yanofsky a80f98b1c7 Use importmulti timestamp when importing watch only keys
When importing a watch-only address over importmulti with a specific timestamp,
the wallet's nTimeFirstKey is currently set to 1. After this change, the
provided timestamp will be used and stored as metadata associated with
watch-only key. This can improve wallet performance because it can avoid the
need to scan the entire blockchain for watch only addresses when timestamps are
provided.

Also adds timestamp to validateaddress return value (needed for tests).

Fixes #9034.
2017-02-10 16:11:19 -05:00
Russell Yanofsky 266a8114cb Use MTP for importmulti "now" timestamps 2017-02-10 15:40:28 -05:00
Russell Yanofsky 3cf991756c Add test to check new importmulti "now" value
Easiest way to test this was to expose the timestamp via the validateaddress
RPC (which was already looking up and returning key metadata).
2017-02-10 15:40:28 -05:00
Russell Yanofsky 442887f27f Require timestamps for importmulti keys
Additionally, accept a "now" timestamp, to allow avoiding rescans for keys
which are known never to have been used.

Note that the behavior when "now" is specified is slightly different than the
previous behavior when no timestamp was specified at all. Previously, when no
timestamp was specified, it would avoid rescanning during the importmulti call,
but set the key's nCreateTime value to 1, which would not prevent future block
reads in later ScanForWalletTransactions calls. With this change, passing a
"now" timestamp will set the key's nCreateTime to the current block time
instead of 1.

Fixes #9491
2017-02-10 15:40:28 -05:00
MarcoFalke b860915f8b
Merge #9707: Fix RPC failure testing
9db8eec Fix RPC failure testing (John Newbery)
2017-02-10 18:02:56 +01:00
Matt Corallo 66f861ade9 Add a test for P2P inactivity timeouts 2017-02-09 17:34:03 -05:00
Matt Corallo b436f92f72 qa: Expose on-connection to mininode listeners 2017-02-08 12:05:13 -05:00
Matt Corallo 8aaba7a6b7 qa: mininode learns when a socket connects, not its first action 2017-02-08 12:05:13 -05:00
John Newbery 9db8eecac1 Fix RPC failure testing
Make sure that RPC tests are actually checking failures correctly by:

- Catching JSON RPC exceptions and verifying the error codes and messages.
- Failing the test case if the JSON RPC exception isn't raised.
2017-02-08 10:24:02 -05:00
Wladimir J. van der Laan b709fe7ffc
Merge #9532: Remove unused variables
90fd29b Remove unused int64_t nSinceLastSeen (practicalswift)
ac4a095 Remove unused Python variables (practicalswift)
2017-02-07 15:28:50 +01:00
Wladimir J. van der Laan 40f7e27d25
Merge #9650: Better handle invalid parameters to signrawtransaction
6dbfe08 [qa] test signrawtransaction merge with missing inputs (Matt Corallo)
ec4f7e4 [qa] Add second input to signrawtransaction test case (Matt Corallo)
691710a [qa] Test that decoderawtransaction throws with extra data appended (Matt Corallo)
922bea9 Better handle invalid parameters to signrawtransaction (Matt Corallo)
7ea0ad5 Fail in DecodeHexTx if there is extra data at the end (Matt Corallo)
2017-02-06 14:51:00 +01:00
Matt Corallo 6dbfe08c29 [qa] test signrawtransaction merge with missing inputs 2017-02-02 17:40:49 -05:00
Russell Yanofsky 4ec057dfa7 [wallet] Set correct metadata on bumpfee wallet transactions
Preserve comment, order form, and account strings from the original wallet
transaction. Also set fTimeReceivedIsTxTime and fFromMe fields for consistency
with CWallet::CreateTransaction. The latter two fields don't influence current
wallet behavior, but do record that the transaction originated in the wallet
instead of coming from the network or sendrawtransaction.
2017-02-02 17:34:22 -05:00
Matt Corallo ec4f7e433e [qa] Add second input to signrawtransaction test case 2017-02-02 17:32:28 -05:00
Matt Corallo 691710a648 [qa] Test that decoderawtransaction throws with extra data appended 2017-02-02 17:32:28 -05:00
MarcoFalke fab035f2f7 qa: Actually test assertions in pruning.py
Also refactor to use wrapper for stop_node
2017-01-26 16:30:15 +01:00
MarcoFalke f89502306d
Merge #9628: qa: Increase a sync_blocks timeout in pruning.py
2f10f06 qa: Increase a sync_blocks timeout in pruning.py (Suhas Daftuar)
2017-01-26 01:12:11 +01:00
Suhas Daftuar 2f10f06196 qa: Increase a sync_blocks timeout in pruning.py 2017-01-25 10:21:37 -05:00
Wladimir J. van der Laan 727a798360
Merge #9516: Bug-fix: listsinceblock: use fork point as reference for blocks in reorg'd chains
7ba0a00 Testing: listsinceblock should not use orphan block height. (Karl-Johan Alm)
ee5c1ce Bug-fix: listsinceblock: use closest common ancestor when a block hash was provided for a chain that was not the main chain. (Karl-Johan Alm)
2017-01-23 16:16:37 +01:00
Wladimir J. van der Laan 5cf3c60fcc
Merge #9607: Remove redundant semicolons in Python code
5cdf106 Remove redundant semicolons in Python code (practicalswift)
2017-01-23 14:02:54 +01:00
practicalswift 5cdf10611f Remove redundant semicolons in Python code 2017-01-20 22:56:11 +01:00
Wladimir J. van der Laan fb75cd04bb
Merge #9377: fundrawtransaction: Keep change-output keys by default, make it optional
c9f3062 Add fundrawtransactions new reserveChangeKey option to the release notes (Jonas Schnelli)
9eb325d [QA] Add test for fundrawtransactions new reserveChangeKey option (Jonas Schnelli)
9aa4e6a [Wallet] Add an option to keep the change address key, true by default (Jonas Schnelli)
2017-01-20 14:32:42 +01:00
Jonas Schnelli 9eb325d079
[QA] Add test for fundrawtransactions new reserveChangeKey option 2017-01-19 20:45:29 +01:00
Wladimir J. van der Laan 2ef52d3cf1
Merge #8456: [RPC] Simplified bumpfee command.
cc0243a [RPC] bumpfee (mrbandrews)
52dde66 [wallet] Add include_unsafe argument to listunspent RPC (Russell Yanofsky)
766e8a4 [wallet] Add IsAllFromMe: true if all inputs are from wallet (Suhas Daftuar)
2017-01-19 19:59:24 +01:00
mrbandrews cc0243ad32 [RPC] bumpfee
This command allows a user to increase the fee on a wallet transaction T, creating a "bumper" transaction B.
T must signal that it is BIP-125 replaceable.
T's change output is decremented to pay the additional fee.  (B will not add inputs to T.)
T cannot have any descendant transactions.
Once B bumps T, neither T nor B's outputs can be spent until either T or (more likely) B is mined.

Includes code by @jonasschnelli and @ryanofsky
2017-01-19 11:29:29 -05:00
MarcoFalke b0b57a1730
Merge #9508: Remove unused Python imports
95bab82 Remove unused Python imports (practicalswift)
2017-01-18 10:48:52 +01:00
Karl-Johan Alm 7ba0a00aae Testing: listsinceblock should not use orphan block height. 2017-01-18 12:31:20 +09:00
Pieter Wuille 812714fd80
Merge #9484: Introduce assumevalid setting to skip validation presumed valid scripts.
7b5e3fe Add assumevalid testcase (John Newbery)
e440ac7 Introduce assumevalid setting to skip presumed valid scripts. (Gregory Maxwell)
2017-01-16 14:07:30 -08:00
John Newbery 7b5e3fe0cc Add assumevalid testcase
Adds a qa testcase testing the new "-assumevalid" option. The testcase builds
a chain that includes and invalid signature for one of the transactions and
sends that chain to three nodes:

 - node0 has no -assumevalid parameter and rejects the invalid chain.
 - node1 has -assumevalid set and accepts the invalid chain.
 - node2 has -assumevalid set but the invalid block is not buried deep
   enough to assume invalid, and so rejects the invalid chain.
2017-01-14 22:17:23 +00:00
Pieter Wuille 3908fc4728
Merge #9375: Relay compact block messages prior to full block connection
02ee4eb Make most_recent_compact_block a pointer to a const (Matt Corallo)
73666ad Add comment to describe callers to ActivateBestChain (Matt Corallo)
962f7f0 Call ActivateBestChain without cs_main/with most_recent_block (Matt Corallo)
0df777d Use a temp pindex to avoid a const_cast in ProcessNewBlockHeaders (Matt Corallo)
c1ae4fc Avoid holding cs_most_recent_block while calling ReadBlockFromDisk (Matt Corallo)
9eb67f5 Ensure we meet the BIP 152 old-relay-types response requirements (Matt Corallo)
5749a85 Cache most-recently-connected compact block (Matt Corallo)
9eaec08 Cache most-recently-announced block's shared_ptr (Matt Corallo)
c802092 Relay compact block messages prior to full block connection (Matt Corallo)
6987219 Add a CValidationInterface::NewPoWValidBlock callback (Matt Corallo)
180586f Call AcceptBlock with the block's shared_ptr instead of CBlock& (Matt Corallo)
8baaba6 [qa] Avoid race in preciousblock test. (Matt Corallo)
9a0b2f4 [qa] Make compact blocks test construction using fetch methods (Matt Corallo)
8017547 Make CBlockIndex*es in net_processing const (Matt Corallo)
2017-01-13 14:52:26 -08:00
practicalswift 95bab821b3 Remove unused Python imports 2017-01-13 19:03:20 +01:00
practicalswift ac4a095306 Remove unused Python variables 2017-01-13 18:55:03 +01:00
Wladimir J. van der Laan 7cb024eba6
Merge #9222: Add 'subtractFeeFromAmount' option to 'fundrawtransaction'.
453bda6 Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'. (Chris Moore)
2017-01-12 12:49:10 +01:00
Russell Yanofsky 918d1fb86b Return height of last block pruned by pruneblockchain RPC
Change suggested by Jonas Schnelli <dev@jonasschnelli.ch> in
https://github.com/bitcoin/bitcoin/pull/7871#discussion_r95577623
2017-01-11 14:25:32 -05:00
Russell Yanofsky afffeea7d9 fixup! Add pruneblockchain RPC to enable manual block file pruning.
Extend pruneblockchain RPC to accept block timestamps as well as block indices.
2017-01-10 08:14:50 -05:00
mrbandrews 1fc4ec7bf2 Add pruneblockchain RPC to enable manual block file pruning. 2017-01-10 08:14:50 -05:00
John Newbery 4e7e2e16e4 Update RPC argument names 2017-01-10 12:04:54 +01:00
Wladimir J. van der Laan 2ca9dcd5b9 test: Add test for RPC named arguments
Add RPC testcase for RPC named arguments.
2017-01-05 11:30:20 +01:00
Wladimir J. van der Laan 5865d41f88 authproxy: Add support for RPC named arguments 2017-01-05 11:30:20 +01:00
Matt Corallo 8baaba653e [qa] Avoid race in preciousblock test.
If node 0 is sufficiently fast to announce its block to node 1,
node 1 might already have the block by the time the
node_sync_via_rpc loop gets around to node 1, resulting in the
submitblock result "duplicate-inconclusive" as node 1 has the block,
but prefers an alternate chain.
2017-01-04 15:56:08 -05:00
Matt Corallo 9a0b2f4c5b [qa] Make compact blocks test construction using fetch methods 2017-01-04 15:56:08 -05:00
Alex Morcos ffeb1956cb add test for -walletrejectlongchains 2017-01-04 13:26:44 -05:00
isle2983 27765b6403 Increment MIT Licence copyright header year on files modified in 2016
Edited via:

$ contrib/devtools/copyright_header.py update .
2016-12-31 11:01:21 -07:00
Wladimir J. van der Laan 5a70572049
Merge #9262: Prefer coins that have fewer ancestors, sanity check txn before ATMP
cee1612 reduce number of lookups in TransactionWithinChainLimit (Gregory Sanders)
af9bedb Test for fix of txn chaining in wallet (Gregory Sanders)
5882c09 CreateTransaction: Don't return success with too-many-ancestor txn (Gregory Sanders)
0b2294a SelectCoinsMinConf: Prefer coins with fewer ancestors (Gregory Sanders)
2016-12-20 13:27:08 +01:00
Wladimir J. van der Laan a7f76512d9
Merge #9352: Attempt reconstruction from all compact block announcements
813ede9 [qa] Update compactblocks test for multi-peer reconstruction (Suhas Daftuar)
7017298 Allow compactblock reconstruction when block is in flight (Suhas Daftuar)
2016-12-19 08:52:42 +01:00
Wladimir J. van der Laan c9e00591cd
Merge #9322: [qa] Don't set unknown rpcserialversion
fa615d3 [qa] Don't set unknown rpcserialversion (MarcoFalke)
80d073c Complain when unknown rpcserialversion is specified (Pieter Wuille)
2016-12-15 20:10:36 +01:00
Suhas Daftuar 813ede91e1 [qa] Update compactblocks test for multi-peer reconstruction 2016-12-15 11:47:04 -05:00
Wladimir J. van der Laan c6fd923886
Merge #9331: [qa] Add test for rescan feature of wallet key import RPCs
d8c0b9f [qa] Add test for rescan feature of wallet key import RPCs (Russell Yanofsky)
2016-12-15 17:06:53 +01:00
Wladimir J. van der Laan 1eef038b1b
Merge #7562: Bump transaction version default to 2
c5c92c4 Update python tests for default tx version=2 (BtcDrak)
dab207e Preserve tx version=1 for certain tests (BtcDrak)
c5d746a tiny test fix for mempool_tests (Alex Morcos)
1f0ca1a Bump default transaction version to 2 (BtcDrak)
2016-12-15 17:03:31 +01:00
Chris Moore 453bda63dd Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'. 2016-12-13 13:36:23 -08:00
Gregory Sanders af9bedbff6 Test for fix of txn chaining in wallet 2016-12-13 09:41:07 -05:00
Russell Yanofsky d8c0b9f525 [qa] Add test for rescan feature of wallet key import RPCs
Covers importaddress, importpubkey, importprivkey, and importmulti RPCs.
2016-12-12 10:18:11 -05:00