HomePhabricator

Merge #10712: Add change output if necessary to reduce excess fee

Authored by jasonbcox on Fri, Feb 8, 23:40.

Description

Merge #10712: Add change output if necessary to reduce excess fee

Summary:
0f402b9 Fix rare edge case of paying too many fees when transaction has no change. (Alex Morcos)
253cd7e Only reserve key for scriptChange once in CreateTransaction (Alex Morcos)

Pull request description:

This is an alternative to #10333

See commit messages.

The first commit is mostly code move, it just moves the change creation code out of the loop.

@instagibbs

Tree-SHA512: f16287ae0f0c6f09cf8b1f0db5880bb567ffa74a50898e3d1ef549ba592c6309ae1a9b251739f63a8bb622d48f03ce2dff9e7a57a6bac4afb4b95b0a86613ea8

Backport of Core PR10712
https://github.com/bitcoin/bitcoin/pull/10712/commits
Completes T534

Applied after this fix: D2522
Since this patch was originally reverted due to a test failure: D2517

Test Plan:

make check
test_runner.py
test_runner.py rpc_fundrawtransaction

Reviewers: deadalnix, Fabien, #bitcoin_abc

Reviewed By: deadalnix, #bitcoin_abc

Subscribers: teamcity, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2526

Details

Committed
jasonbcoxSun, Feb 10, 05:35
Pushed
jasonbcoxSun, Feb 10, 05:35
Reviewer
Restricted Project
Differential Revision
D2526: Merge #10712: Add change output if necessary to reduce excess fee
Parents
rABC634af4262efc: Remove unused function and dependencies from rpc_listtransactions
Branches
Unknown
Tags
Unknown