HomePhabricator

[rpc] add send method

Description

[rpc] add send method

Summary:
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/16378 | core#16378]] [3/3]
https://github.com/bitcoin/bitcoin/pull/16378/commits/92326d89766155a792254d30a9962251b8fc7799

Depends on D10264

Backport differences:

  • Arguments conf_target and estimate_mode, as well as the options of the same name are removed. The option fee_rate can be used to set the fee. The RPCExamples are updated accordingly.
  • Options change_type and replaceable are removed.
  • The functional test sets the fee rate with fee_rate option, so the unit is XEC/kB instead of sat/B.
  • In the test, I did not set decimal.getcontext().prec = 2, because this causes a suprising loss of precision that makes somes checks fail:
>>> from decimal import getcontext, Decimal
>>> getcontext().prec = 2
>>> Decimal("1329999995.50") - Decimal("1328999993.25")
Decimal('1.0E+6')

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
Sjors Provoost <sjors@sprovoost.nl>Authored on Aug 7 2020, 15:36
PiRKCommitted on Oct 7 2021, 12:57
PiRKPushed on Oct 7 2021, 12:57
Reviewer
Restricted Project
Differential Revision
D10265: [rpc] add send method
Parents
rABC3ed98b036f03: [rpc] add snake case aliases for transaction methods
Branches
Unknown
Tags
Unknown

Event Timeline