Commit graph

123 commits

Author SHA1 Message Date
Andrew Poelstra
d39d57c704 Merge 1c7be9ab90 into merged_master (Bitcoin PR #20286)
I hate this PR.
2021-06-28 21:30:17 +00:00
Andrew Poelstra
d6c85c5620 Merge 4b15ffe991 into merged_master (Bitcoin PR #20832) 2021-06-18 20:35:42 +00:00
Andrew Poelstra
27930edc9c Merge 4a540683ec into merged_master (Bitcoin PR #20813) 2021-06-16 14:11:07 +00:00
Andrew Poelstra
c8d2647081 Merge 38176dc665 into merged_master (Bitcoin PR #20573) 2021-06-13 21:04:50 +00:00
Andrew Poelstra
d3321390c2 Merge ca4a784942 into merged_master (Bitcoin PR #20410) 2021-05-07 20:56:02 +00:00
Michael Dietz
085b3a7299
rpc: deprecate addresses and reqSigs from rpc outputs
1) add a new sane "address" field (for outputs that have an
   identifiable address, which doesn't include bare multisig)
2) with -deprecatedrpc: leave "reqSigs" and "addresses" intact
   (with all weird/wrong behavior they have now)
3) without -deprecatedrpc: drop "reqSigs" and "addresses" entirely,
   always.
2021-03-23 10:51:43 -04:00
Bezdrighin
8f0b64fb51 Better error messages for invalid addresses
This commit addresses #20809.

We add an additional 'error' property in the result of 'validateaddress' in case the address is not valid that gives a short description of why the address in invalid. We also change the error message returned by 'getaddressinfo' in case the address is invalid.
2021-01-24 02:44:53 +01:00
MarcoFalke
fa0074e2d8
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-12-31 09:45:41 +01:00
Jon Atack
6fa72ceb80
test: add coverage for passing fee rate as a string 2020-12-04 22:35:31 +01:00
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
MarcoFalke
fa69c2c784
wallet: Do not treat default constructed types as None-type 2020-11-19 13:48:38 +01: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