Skip to content

Subtract fee from amount (rebase)#5831

Merged
laanwj merged 4 commits intobitcoin:masterfrom
laanwj:2015_02_cozz_subtractfee
Mar 16, 2015
Merged

Subtract fee from amount (rebase)#5831
laanwj merged 4 commits intobitcoin:masterfrom
laanwj:2015_02_cozz_subtractfee

Conversation

@laanwj
Copy link
Member

@laanwj laanwj commented Feb 26, 2015

Rebase #4331

  • Resolve conflicts w/ moved src/core.h
  • Resolve conflict in CoinControlDialog::updateLabels function
  • Port the RPC test to python

@laanwj laanwj changed the title 2015 02 cozz subtractfee Subtract fee from amount (rebase) Feb 26, 2015
@laanwj laanwj mentioned this pull request Feb 26, 2015
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code-block needs to be moved one line above as the variable nBytes is used there

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good catch

@cozz
Copy link
Contributor

cozz commented Feb 26, 2015

nit: the second passage of the commit-message is now wrong, this was only true for the initial version of this pull-request, I'd say remove it, to avoid someone gets confused by it.

@laanwj laanwj added the Wallet label Feb 27, 2015
@jonasschnelli
Copy link
Contributor

needs rebase.

GUI and RPC looks good. Nice @cozz! Thanks for the rebase and rework @laanwj.

The new parameter for sendmany (json object) looks a bit as a overdose to me. A single boolean would maybe be sufficient.

Tested ACK.

@laanwj
Copy link
Member Author

laanwj commented Mar 5, 2015

With regard to future extensibility, I like the idea of adding a JSON structure to sendmany. Should have been done that in the first place instead of the long-winded positional command lines for some methods.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to extend deprecated methods?

@laanwj laanwj force-pushed the 2015_02_cozz_subtractfee branch 3 times, most recently from a7cd8c2 to d18e3d2 Compare March 5, 2015 12:37
@jonasschnelli
Copy link
Contributor

Agreed. JSON structures as parameter (or as optional parameter) would be more convenient and extendable. sandmany and sendfrom are also marked for deprecation so i assume main focus should be GUI and sendtoaddress.

@laanwj
Copy link
Member Author

laanwj commented Mar 5, 2015

eh, who is deprecating sendmany? If we were to keep one send* method, that would be the one. It is the most general send method.

@luke-jr
Copy link
Member

luke-jr commented Mar 5, 2015

@laanwj The JSON structure in the current PR only allows for a boolean for each recipient. Are you suggesting it be changed to a parameter object (eg, like getblocktemplate)? If so, I agree that seems like a better approach.

As far as multiple recipients sharing the fee, it seems more logical to be using an Array than an Object with only values of "true".

@jonasschnelli
Copy link
Contributor

Re-ACK (including @luke-jr commits)

@cozz
Copy link
Contributor

cozz commented Mar 7, 2015

help-description of sendmany is now wrong after switching from object to array

@luke-jr
Copy link
Member

luke-jr commented Mar 7, 2015

@cozz What's wrong about it? Looks fine to me?

@cozz
Copy link
Contributor

cozz commented Mar 7, 2015

  • "A json object with addresses and booleans" - its not an object but an array and it doesnt take booleans
  • "Default for each address is false" - this sentence should be removed

@laanwj
Copy link
Member Author

laanwj commented Mar 9, 2015

@luke-jr @cozz Added a commit that fixes the help message.

cozz and others added 3 commits March 13, 2015 11:04
Fixes bitcoin#2724 and bitcoin#1570.

Adds the
automatically-subtract-the-fee-from-the-amount-and-send-whats-left
feature to the GUI and RPC (sendtoaddress,sendmany).
…from, rather than an Object with all values being identical
@laanwj laanwj force-pushed the 2015_02_cozz_subtractfee branch from 0978665 to 1d9b378 Compare March 13, 2015 10:14
@laanwj
Copy link
Member Author

laanwj commented Mar 13, 2015

I've squashed the two squashme commits, as well as @luke-jr's commit that reverts the changes to sendfrom (so that its API not touched at all).

@jonasschnelli
Copy link
Contributor

Retested ACK.
Binaries: https://builds.jonasschnelli.ch/pulls/5831/

bildschirmfoto 2015-03-13 um 17 35 32
bildschirmfoto 2015-03-13 um 17 35 07

@laanwj
Copy link
Member Author

laanwj commented Mar 16, 2015

Thanks for testing @jonasschnelli

@laanwj laanwj merged commit 1d9b378 into bitcoin:master Mar 16, 2015
laanwj added a commit that referenced this pull request Mar 16, 2015
1d9b378 qa/rpc-tests/wallet: Tests for sendmany (Luke Dashjr)
40a7573 rpcwallet/sendmany: Just take an array of addresses to subtract fees from, rather than an Object with all values being identical (Luke Dashjr)
292623a Subtract fee from amount (Cozz Lovan)
90a43c1 [Qt] Code-movement-only: Format confirmation message in sendcoinsdialog (Cozz Lovan)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants