8000 RPC: Show fee in results for signrawtransaction* for segwit inputs by luke-jr · Pull Request #18479 · bitcoin/bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

RPC: Show fee in results for signrawtransaction* for segwit inputs #18479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

luke-jr
Copy link
Member
@luke-jr luke-jr commented Mar 31, 2020

Rebase of #12911

This adds a "fee" field to the resulting JSON for signrawtransaction* so a user can double check the fee they're paying before sending a transaction. The field is only shown in cases where the input amounts are all known ⇔ are all segwit inputs.

$ ./bitcoin-cli -regtest signrawtransactionwithwallet 0200000001901c16d5ac11824ca64c9c9dbe925c83fc1af9872bb23bbc9c6cd25419e2f69c0000000000feffffff0210b2d0df0000000017a914d9214ccd777e5cce540d38c3466c2cb5545339c5874031354a0000000017a914bee793caf793996dc9f617a5ad04ec2b87c6f9538700000000
{
  "hex": "0200000001901c16d5ac11824ca64c9c9dbe925c83fc1af9872bb23bbc9c6cd25419e2f69c00000000494830450221008fd0d0cfd16a06f282e720129351f2756f416b916f7a0a3be8d5db0c7db107af022028dafae6ec7d30882efe101c16b5f3893254bf5385664eddadf0d3f6e479381c01feffffff0210b2d0df0000000017a914d9214ccd777e5cce540d38c3466c2cb5545339c5874031354a0000000017a914bee793caf793996dc9f617a5ad04ec2b87c6f9538700000000",
  "complete": true,
  "fee": 0.00003760,
  "feerate": 0.00020000
}

@DrahtBot
Copy link
Contributor
DrahtBot commented Mar 31, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@jonasschnelli
Copy link
Contributor

Concept ACK.
Light code review ACK 9a5468e.
I found it a bit confusing that you pass the optional CAmount sometimes as reference sometimes a pointer.

Copy link
Member
@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

Concept ACK

@luke-jr luke-jr force-pushed the rpc_sign_show_fees branch from d47aefb to a1da1f9 Compare August 20, 2020 01:10
@luke-jr
Copy link
Member Author
luke-jr commented Aug 20, 2020

Rebased again

@DrahtBot
Copy link
Contributor
DrahtBot commented Dec 6, 2020

🐙 This pull request conflicts with the target branch and needs rebase.

Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".

@@ -274,12 +274,13 @@ void SignTransaction(CMutableTransaction& mtx, const SigningProvider* keystore,

// Script verification errors
std::map<int, std::string> input_errors;
Optional<CAmount> inputs_amount_sum;
Copy link
Member

Choose a reason for hiding this comment

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

@luke-jr
Copy link
Member Author
luke-jr commented Jul 7, 2021

Closing due to lack of interest.

@luke-jr luke-jr closed this Jul 7, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
71C9
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0