Commit graph

113 commits

Author SHA1 Message Date
Andrew Poelstra
5b89a9fc92 Merge 80e32e120e into merged_master (Bitcoin PR #20305) 2020-12-02 17:53:59 +00:00
Andrew Poelstra
2577c79f78 Merge 5d32009f1a into merged_master (Bitcoin PR #20220) 2020-12-02 03:05:14 +00:00
Andrew Poelstra
6f267e338a Merge 47fc883106 into merged_master (Bitcoin PR #19967) 2020-12-01 14:36:58 +00:00
Andrew Poelstra
33a0d5e270 Merge 301959fa74 into merged_master (Bitcoin PR #20043) 2020-11-30 02:42:44 +00:00
Andrew Poelstra
1b85209c18 Merge 1769828684 into merged_master (Bitcoin PR #19501)
Adds "verbose" flag to a bunch of RPC that pass through to SendMoney. I also
added it to sendtomainchain and destroyamount.
2020-11-30 02:17:54 +00:00
Andrew Poelstra
15764533c6 Merge c91f955f44 into merged_master (Bitcoin PR #19887) 2020-11-28 23:42:28 +00:00
Andrew Poelstra
afe472121a Merge a1d14f522c into merged_master (Bitcoin PR #19671) 2020-11-28 19:48:53 +00:00
Andrew Poelstra
5f6eb8ee3f Merge f98872f127 into merged_master (Bitcoin PR #18244) 2020-11-28 18:55:44 +00:00
Andrew Poelstra
5282cc36d3 Merge 3ab2582c7f into merged_master (Bitcoin PR #19730) 2020-11-27 21:43:55 +00:00
Andrew Poelstra
c98788b086 Merge cb1ee1551c into merged_master (Bitcoin PR #19674) 2020-11-27 14:17:51 +00:00
Andrew Poelstra
74108c6a87 Merge 4db44acf2d into merged_master (Bitcoin PR #18202)
What a pain. Again, not naming names, but it was Sjors again.
2020-11-26 01:46:05 +00:00
Andrew Poelstra
a2b426f3f9 Merge f32f7e907a into merged_master (Bitcoin PR #11413) 2020-11-26 01:09:13 +00:00
Andrew Poelstra
d38085da61 Merge 520e435b5e into merged_master (Bitcoin PR #18918) 2020-11-26 01:08:51 +00:00
Andrew Poelstra
e42dc5493b Merge 7bcc42b403 into merged_master (Bitcoin PR #18873) 2020-11-26 01:08:39 +00:00
Andrew Poelstra
1c12ae1719 Merge eef90c14ed into merged_master (Bitcoin PR #16528)
This is the 43-commit descriptor wallet PR. It was remarkably easy to merge, given
its magnitude. With this commit Elements supports importing Bitcoin descriptors
and deriving (Bitcoin) addresses, though of course it does not support blinding
yet. That is a post-rebase project.

The material changes were:

1. Changing constants in the tests (super annoying but nothing surprising)

2. Adding a missing "skip if this coin is not ours" check in src/script/sign.cpp
   which was causing us to erroneously remove existing witnesses from transactions.
   This wasn't a problem before this commit since we would only ask specific
   scriptpubkeymans to sign, and we'd never ask any to sign inputs we didn't
   own. Andy simplified the logic here to always try every scriptpubkeyman,
   which means they have to play a bit more nicely with each other.

Other than that, this was a big diff with many conflicts but literally all of
them were "we both added code" and the resolution was to take both sides.
2020-11-26 01:08:31 +00:00
Andrew Poelstra
ca0936ab69 Merge 6d0e532ae0 into merged_master (Bitcoin PR #17585) 2020-11-26 00:29:43 +00:00
Andrew Poelstra
74d2e8da1b Merge 7ea3b85ecf into merged_master (Bitcoin PR #17578) 2020-11-14 16:52:04 +00:00
Andrew Poelstra
11487538e9 Merge df2b743759 into merged_master (Bitcoin PR #17675) 2020-11-14 16:51:55 +00:00
Andrew Poelstra
6a5fc1dd58 Merge d8a66626d6 into merged_master (Bitcoin PR #17283) 2020-11-14 16:51:50 +00:00
Jon Atack
449b730579
wallet: provide valid values if invalid estimate mode passed
Co-authored-by: Murch <murch@murch.one>
2020-11-12 11:43:17 +01:00
Jon Atack
173b5b5fe0
wallet: update fee rate units, use sat/vB for fee_rate error messages
and BTC/kvB for feeRate error messages.
2020-11-12 11:43:03 +01:00
Jon Atack
a0d4957473
wallet: introduce fee_rate (sat/vB) param/option
Create a fee_rate (sat/vB) RPC param and replace overloading the conf_target and
estimate_mode params in the following 6 RPCs with it:

- sendtoaddress
- sendmany
- send
- fundrawtransaction
- walletcreatefundedpsbt
- bumpfee

In RPC bumpfee, the previously existing fee_rate remains but the unit is changed
from BTC/kvB to sat/vB. This is a breaking change, but it should not be an
overly risky one, as the units change by a factor of 1e5 and any fees specified
in BTC/kvB after this commit will either be too low and raise an error or be 1
sat/vB and can be RBFed.

Update the test coverage for each RPC.

Co-authored-by: Murch <murch@murch.one>
2020-11-11 15:55:59 +01:00
Andrew Poelstra
1b3ae6c58b Merge fecc1be231 into merged_master (Bitcoin PR #16884) 2020-11-09 21:20:33 +00:00
Andrew Poelstra
e87be41b02 Merge 742cd77f6f into merged_master (Bitcoin PR #16929) 2020-11-09 21:20:28 +00:00
Andrew Poelstra
b24be4b1a7 Merge 59c138d2f1 into merged_master (Bitcoin PR #16898) 2020-11-09 21:20:27 +00:00
Andrew Poelstra
244335056c Merge 0ee0474234 into merged_master (Bitcoin PR #16521) 2020-11-09 21:20:26 +00:00
Andrew Poelstra
31729410b6 Merge b0a7a76c9d into merged_master (Bitcoin PR #16873) 2020-11-09 21:20:24 +00:00
Andrew Poelstra
183aea8254 Merge 4bfef0daeb into merged_master (Bitcoin PR #16866) 2020-11-09 21:20:24 +00:00
Andrew Poelstra
d73a5a5a8d Merge 33f9750b1b into merged_master (Bitcoin PR #16185) 2020-11-09 21:20:20 +00:00
Andrew Poelstra
b57516e11a Merge 24dbcf3808 into merged_master (Bitcoin PR #15891)
Disabled a test that `-acceptnonstdtxn` is disabled on mainnet, because
I couldn't figure out how to make the test jig choose mainnet.
2020-11-09 21:20:06 +00:00
Samuel Dobson
5d32009f1a
Merge #20220: wallet, rpc: explicit fee rate follow-ups/fixes for 0.21
0be29000c0 rpc: update conf_target helps for correctness/consistency (Jon Atack)
778b9be406 wallet, rpc: fix send subtract_fee_from_outputs help (Jon Atack)
603c005083 wallet: add rpc send explicit fee rate coverage (Jon Atack)
dd341e602d wallet: add sendtoaddress/sendmany explicit fee rate coverage (Jon Atack)
44e7bfa603 wallet: add walletcreatefundedpsbt explicit fee rate coverage (Jon Atack)
6e1ea4273e test: refactor for walletcreatefundedpsbt fee rate coverage (Jon Atack)
3ac7b0c6f1 wallet: fundrawtx fee rate coverage, fixup ParseConfirmTarget() (Jon Atack)
2d8eba8f84 wallet: combine redundant bumpfee invalid params and args tests (Jon Atack)
1697a40b6f wallet: improve bumpfee error/help, add explicit fee rate coverage (Jon Atack)
fc5721723d wallet: fix SetFeeEstimateMode() error message (Jon Atack)
052427eef1 wallet, bugfix: fix bumpfee with explicit fee rate modes (Jon Atack)

Pull request description:

  Follow-up to #11413 providing a base to build on for #19543:

  - bugfix for `bumpfee` raising a JSON error with explicit feerates, fixes issue #20219
  - adds explicit feerate test coverage for `bumpfee`, `fundrawtransaction`, `walletcreatefundedpsbt`, `send`, `sendtoaddress`, and `sendmany`
  - improves a few related RPC error messages and `ParseConfirmTarget()` / error message
  - fixes/improves the explicit fee rate information in the 6 RPC helps, of which 2 were also missing `conf_target` sat/B units

  This provides a spec and regression coverage for the potential next step of a universal `sat/vB` feerate argument (see #19543), as well as immediate coverage and minimum fixes for 0.21.

ACKs for top commit:
  kallewoof:
    Concept/Tested ACK 0be29000c0
  meshcollider:
    Code review + functional test run ACK 0be29000c0

Tree-SHA512: efd965003e991cba51d4504e2940f06ab3d742e34022e96a673606b44fad85596aa03a8c1809f06df7ebcf21a38e18a891e54392fe3d6fb4d120bbe4ea0cf5e0
2020-11-04 16:35:23 +13:00
Jon Atack
dd341e602d
wallet: add sendtoaddress/sendmany explicit fee rate coverage 2020-10-29 00:22:04 +01:00
Andrew Poelstra
041d9ca6c3 Merge 0e9cb2d24d into merged_master (Bitcoin PR #15773) 2020-10-28 15:28:06 +00:00
Andrew Poelstra
4ddc27c626 Merge 8dbb2c5e67 into merged_master (Bitcoin PR #15680) 2020-10-28 00:53:05 +00:00
Andrew Poelstra
7d93f137a0 Merge c033c4b5ce into merged_master (Bitcoin PR #13541) 2020-10-28 00:09:04 +00:00
Andrew Poelstra
0f6e886bdb Merge f9dbb319d2 into merged_master (Bitcoin PR #15485) 2020-10-27 20:06:35 +00:00
Jon Atack
fc5721723d
wallet: fix SetFeeEstimateMode() error message
to clarify for the user the confusing error message that the missing fee rate
needs to be set in the conf_target param/option.
2020-10-25 00:35:38 +02:00
Prayank
4b16c61461 scripted-diff: test: Replace uses of (dis)?connect_nodes global
-BEGIN VERIFY SCRIPT-

 # max-depth=0 excludes test/functional/test_framework/...
 FILES=$(git grep -l --max-depth 0 "connect_nodes" test/functional)

 # Replace (dis)?connect_nodes(self.nodes[a], b) with self.(dis)?connect_nodes(a, b)
 sed -i 's/\b\(dis\)\?connect_nodes(self\.nodes\[\(.*\)\]/self.\1connect_nodes(\2/g' $FILES

 # Remove imports in the middle of a line
 sed -i 's/\(dis\)\?connect_nodes, //g' $FILES
 sed -i 's/, \(dis\)\?connect_nodes//g' $FILES

 # Remove imports on a line by themselves
 sed -i '/^\s*\(dis\)\?connect_nodes,\?$/d' $FILES
 sed -i '/^from test_framework\.util import connect_nodes$/d' $FILES

-END VERIFY SCRIPT-

Co-authored-by: Elliott Jin <elliott.jin@gmail.com>
2020-10-20 00:42:00 -07:00
MarcoFalke
faf60dee34
doc: Remove double-whitespace from help string, other whitespace fixups 2020-09-30 09:28:33 +02:00
Sishir Giri
69cf5d4eeb [test] Make sure send rpc returns fee reason 2020-09-28 15:04:56 -07:00
Sishir Giri
d5863c0b3e [send] Make send RPCs return fee reason 2020-09-26 17:57:26 -07:00
Fabian Jahr
56b018ca7f
test: Fix flaky wallet_basic test
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
2020-09-05 19:55:59 +02:00
fanquake
a1d14f522c
Merge #19671: wallet: Remove -zapwallettxes
3340dbadd3 Remove -zapwallettxes (Andrew Chow)

Pull request description:

  It's not clear what use there is to keeping `-zapwallettxes` given that it's intended usage has been superseded by `abandontransaction`. So this removes it outright.

  Alternative to #19700

ACKs for top commit:
  meshcollider:
    utACK 3340dbadd3
  fanquake:
    ACK 3340dbadd3 - remaining manpage references will get cleaned up pre-release.

Tree-SHA512: 3e58e1ef6f4f94894d012b93e88baba3fb9c2ad75b8349403f9ce95b80b50b0b4f443cb623cf76c355930db109f491b3442be3aa02972e841450ce52cf545fc8
2020-09-01 09:26:28 +08:00
Andrew Chow
3340dbadd3 Remove -zapwallettxes
-zapwallettxes is made a hidden option to inform users that it is
removed and they should be using abandontransaction to do the stuck
transaction thing.
2020-08-31 12:39:19 -04:00
Samuel Dobson
f98872f127
Merge #18244: rpc: fundrawtransaction and walletcreatefundedpsbt also lock manually selected coins
6d1f51343c [rpc] fundrawtransaction, walletcreatefundedpsbt lock manually selected coins (Sjors Provoost)

Pull request description:

  When using `fundrawtransaction` and `walletcreatefundedpsbt` with `lockUnspents`, it would only lock automatically selected coins, not manually selected coins. That doesn't make much sense to me if the goal is to prevent accidentally double-spending yourself before you broadcast a transaction.

  Note that when  creating a transaction, manually selected coins are automatic "unlocked" (or more accurately: the lock is ignored). Earlier versions of this PR introduced an error when a locked coin is manually selected, but this idea was abandoned after some discussion. An application that uses this RPC should either rely on automatic coin selection (with `lockUnspents`) or handle lock concurrency itself with manual coin selection. In particular it needs to make sure to avoid/pause calls with automatic coin selection between calling `lockunspent` and the subsequent spending RPC.

  See #7518 for historical background.

ACKs for top commit:
  meshcollider:
    Code review ACK 6d1f51343c
  fjahr:
    Code review ACK 6d1f51343c

Tree-SHA512: 8773c788d92f2656952e1beac147ba9956b8c5132d474e0880e4c89ff53642928b4cbfcd1cb3d17798b9284f02618a8830c93a9f7a4733e5bded96adff1d5d4d
2020-08-31 23:30:53 +12:00
MarcoFalke
fa330ec2fe
test: Remove confusing and broken use of wait_until global 2020-08-15 14:01:54 +02:00
Sjors Provoost
6d1f51343c
[rpc] fundrawtransaction, walletcreatefundedpsbt lock manually selected coins
Previously only automatically selected coins were locked when lockUnspents is set.
It now also locks selected coins.
2020-08-07 14:13:15 +02:00
Sebastian Falbesoner
dac7a111bd refactor: test: use _ variable for unused loop counters
substitutes "for x in range(N):" by "for _ in range(N):"
indicates to the reader that a block is just repeated N times, and
that the loop counter is not used in the body
2020-08-06 18:39:33 +02:00
Samuel Dobson
4db44acf2d
Merge #18202: refactor: consolidate sendmany and sendtoaddress code
08fc6f6cfc [rpc] refactor: consolidate sendmany and sendtoaddress code (Sjors Provoost)

Pull request description:

  I consolidated code between these two RPC calls, since `sendtoaddress` is essentially `sendmany` with 1 destination.

  Unless I overlooked something, the only behaviour change is that some `sendtoaddress` error codes changed from `-4` to `-6`. The release note mentions this.

  Salvaged from #18201.

ACKs for top commit:
  fjahr:
    Code review ACK 08fc6f6cfc
  jonatack:
    ACK 08fc6f6cfc
  meshcollider:
    Code review & functional test run ACK 08fc6f6cfc

Tree-SHA512: 7b66c52fa0444a4d02fc3f81d9c2a386794d447616026a30111eda35fb46510475eea6506a9ceda00bb4e0230ebb758da5d236b3ac05c954c044fa68a1e3e909
2020-07-12 14:42:35 +12:00
Karl-Johan Alm
05227a3554
tests for bumpfee / estimate_modes
* invalid parameter tests for bumpfee
* add tests for no conf_target explicit estimate_modes
2020-06-24 16:01:38 +09:00