Skip to content
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

Use wallet RBF default for walletcreatefundedpsbt #15911

Open
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@Sjors
Copy link
Member

commented Apr 27, 2019

The walletcreatefundedpsbt RPC call currently ignores -walletrbf and defaults to not use RBF. This PR fixes that.

This PR also replaces UniValue in ConstructTransaction with a bool in preparation of moving this helper method out of the RPC codebase entirely. This may be a bit overkill, but does slightly simplify it.

Fixes #15878

@Sjors

This comment has been minimized.

Copy link
Member Author

commented Apr 27, 2019

(my initial attempt ddfce96 used Optional<Bool>) Given that wallet->m_signal_rbf is a boolean I think we should just stop treating replaceable as an optional parameter. In that case ConstructTransaction can take a boolean parameter and be simplified a bit.

@Sjors Sjors force-pushed the Sjors:2019/04/walletcreatefundedpsbt branch from aafdfde to 6096851 Apr 27, 2019

@DrahtBot

This comment has been minimized.

Copy link
Contributor

commented Apr 27, 2019

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #16016 ([tests] RPC bumpfee totalFee deprecation by jonatack)
  • #15996 (Deprecate totalfee argument in bumpfee by instagibbs)
  • #15876 ([rpc] signer bump fee by Sjors)
  • #14912 ([WIP] External signer support (e.g. hardware wallet) by Sjors)
  • #14641 (rpc: Add min_conf option to fund transaction calls by promag)
  • #11413 ([wallet] [rpc] sendtoaddress/sendmany: Add explicit feerate option by kallewoof)

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.

Show resolved Hide resolved src/wallet/rpcwallet.cpp Outdated
Show resolved Hide resolved src/wallet/rpcwallet.cpp Outdated

luke-jr added a commit to bitcoinknots/bitcoin that referenced this pull request May 1, 2019

@Sjors Sjors force-pushed the Sjors:2019/04/walletcreatefundedpsbt branch from 6096851 to 9a27860 May 12, 2019

@Sjors Sjors force-pushed the Sjors:2019/04/walletcreatefundedpsbt branch from 9a27860 to 9b1b9cf May 12, 2019

@Sjors Sjors referenced this pull request May 12, 2019

Open

[WIP] External signer support (e.g. hardware wallet) #14912

0 of 2 tasks complete

@MarcoFalke MarcoFalke added this to the 0.18.1 milestone May 16, 2019

@MarcoFalke

This comment has been minimized.

Copy link
Member

commented May 23, 2019

utACK 9b1b9cf

@MarcoFalke

This comment has been minimized.

Copy link
Member

commented May 25, 2019

@Sjors Please squash the first and third commit, as they don't compile:

  CXX      wallet/libbitcoin_wallet_a-rpcwallet.o
wallet/rpcwallet.cpp: In function ‘UniValue walletcreatefundedpsbt(const JSONRPCRequest&)’:
wallet/rpcwallet.cpp:4137:143: error: cannot convert ‘const UniValue’ to ‘bool’
 4137 |     CMutableTransaction rawTx = ConstructTransaction(request.params[0], request.params[1], request.params[2], request.params[3]["replaceable"]);
      |                                                                                                                                               ^
      |                                                                                                                                               |
      |                                                                                                                                               const UniValue
In file included from wallet/rpcwallet.cpp:20:
./rpc/rawtransaction_util.h:30:128: note:   initializing argument 4 of ‘CMutableTransaction ConstructTransaction(const UniValue&, const UniValue&, const UniValue&, bool)’
   30 | CMutableTransaction ConstructTransaction(const UniValue& inputs_in, const UniValue& outputs_in, const UniValue& locktime, bool rbf);
      |                                                                                                                           ~~~~~^~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.