Commit graph

39 commits

Author SHA1 Message Date
Michi Lumin 575f734eec Initial back end framework to separate wallet and relay fees + dust. 2021-07-30 16:07:22 -06:00
Patrick Lodder 31e6a818ec
rpc-tests: fix fundrawtransaction coin amounts to not spend dust 2020-07-22 13:51:16 +02: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
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
Gregory Sanders 18476423fb
[Wallet] unset change position when there is no change on exact match 2017-05-31 10:57:16 +02: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
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
Jonas Schnelli 9eb325d079
[QA] Add test for fundrawtransactions new reserveChangeKey option 2017-01-19 20:45:29 +01:00
Chris Moore 453bda63dd Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'. 2016-12-13 13:36:23 -08:00
MarcoFalke 76fcd9d503
Merge #9309: [qa] Wallet needs to stay unlocked for whole test
9359f8a Wallet needs to stay unlocked for whole test (Alex Morcos)
2016-12-10 18:47:36 +01:00
Alex Morcos 9359f8ad3b Wallet needs to stay unlocked for whole test 2016-12-09 11:42:23 -05:00
Jonas Schnelli 1a6eacbf3b
[QA] add fundrawtransaction test on a locked wallet with empty keypool 2016-12-07 15:20:40 +01:00
MarcoFalke fa7c35c4ec [qa] util: Move wait_bitcoinds() into stop_nodes() 2016-10-02 11:16:44 +02:00
MarcoFalke fa324653ab [qa] fundrawtransaction: Create get_unspent() 2016-06-17 15:19:11 +02:00
MarcoFalke fa8ce3b670 [qa] assert 'changePosition out of bounds' 2016-06-17 15:19:02 +02:00
MarcoFalke fae1d063fc [qa] fundrawtransaction: Fix race, assert amounts 2016-06-13 21:35:04 +02:00
MarcoFalke fa7f4f577c [rpc] fundrawtransaction feeRate: Use BTC/kB
Also introduce UniValueType

UniValueType is a wrapper for UniValue::VType which allows setting
a typeAny flag. This flag indicates the type does not matter.

(Used by RPCTypeCheckObj)
2016-06-07 13:12:57 +02:00
MarcoFalke faf82e8fc8 [rpc] fundrawtransaction: Fix help text and interface 2016-06-06 19:40:35 +02:00
Wladimir J. van der Laan 8c1e49ba13
Merge #7967: [RPC] add feerate option to fundrawtransaction
04eaa90 Add more clear interface for CoinControl.h regarding individual feerate (Jonas Schnelli)
3b35e48 [RPC] add feerate option to fundrawtransaction (Jonas Schnelli)
2016-06-03 15:47:48 +02:00
MarcoFalke fac9349798 [qa] Remove hardcoded "4 nodes" from test_framework 2016-05-15 12:58:53 +02:00
MarcoFalke fa389d4edc [qa] Switch to py3 2016-05-05 15:43:37 +02:00
Jonas Schnelli 3b35e4896b
[RPC] add feerate option to fundrawtransaction 2016-04-28 22:04:07 +02:00
João Barbosa af4fe7fd12 Add change options to fundrawtransaction 2016-04-15 15:36:05 +02:00
MarcoFalke faa41ee204 [qa] py2: Unfiddle strings into bytes explicitly 2016-04-10 20:35:57 +02:00
MarcoFalke fa2cea163b [qa] rpc-tests: Properly use integers, floats 2016-04-01 21:23:30 +02:00
MarcoFalke fa524d9ddb [qa] Use python2/3 syntax 2016-03-31 18:35:17 +02:00
MarcoFalke fab3890156 [qa] rpc-test: Normalize assert() 2016-03-19 19:07:08 +01:00
MarcoFalke 7777994846 [qa] Fix pyton syntax in rpc tests 2016-01-13 20:31:03 +01:00
Alex Morcos bebe58b748 SQUASHME: Fix rpc tests that assumed fallback to minRelayTxFee 2016-01-05 17:47:04 -05:00
MarcoFalke fa24439ff3 Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
MarcoFalke 0d8b1759d2 [rpc-tests] fundrawtransaction: Update fee after minRelayTxFee increase 2015-10-20 10:25:45 +02:00
Wladimir J. van der Laan ddd8d80c63
Merge pull request #6415
d042854 SQUASH "Implement watchonly support in fundrawtransaction" (Matt Corallo)
428a898 SQUASH "Add have-pubkey distinction to ISMINE flags" (Matt Corallo)
6bdb474 Implement watchonly support in fundrawtransaction (Matt Corallo)
f5813bd Add logic to track pubkeys as watch-only, not just scripts (Matt Corallo)
d3354c5 Add have-pubkey distinction to ISMINE flags (Matt Corallo)
5c17059 Update importaddress help to push its use to script-only (Matt Corallo)
a1d7df3 Add importpubkey method to import a watch-only pubkey (Matt Corallo)
907a425 Add p2sh option to importaddress to import redeemScripts (Matt Corallo)
983d2d9 Split up importaddress into helper functions (Matt Corallo)
cfc3dd3 Also remove pay-2-pubkey from watch when adding a priv key (Matt Corallo)
2015-08-14 16:28:37 +02:00
Matt Corallo 6bdb474dc9 Implement watchonly support in fundrawtransaction
Some code and test cases stolen from
Bryan Bishop <bryan@ledgerx.com> (pull #5524).
2015-07-20 16:01:38 -07:00
zathras-crypto 0aad1f13b2
Exempt unspendable transaction outputs from dust checks
Since unspendable outputs can't be spent, there is no threshold at which it would be uneconomic to spend them.

This primarily targets transaction outputs with `OP_RETURN`.

---

Initially based on:

commit 9cf0ae26350033d43d5dd3c95054c0d1b1641eda
Author: zathras-crypto <zathrasc@gmail.com>
Date:   Wed Mar 25 02:04:02 2015 -0700

Changes:

- cherry-picked on top of bitcoin:master
- added RPC test for fundrawtransaction
2015-07-18 17:31:55 +02:00
Jonas Schnelli 9da8fc8f26 [QA] remove rawtransactions.py from the extended test list
rawtransactions.py is already in the standard test list
2015-07-10 22:01:41 +02:00
Jonas Schnelli 6ed38b0b8f [QA] fix possible reorg issue in rawtransaction.py/fundrawtransaction.py RPC test
- added missing mempool sync between block generations
2015-07-10 21:13:33 +02:00
Jonas Schnelli 208589514c fundrawtransaction tests 2015-06-11 01:03:23 -07:00