Page MenuHomePhabricator

Add scripts to dumpwallet RPC
ClosedPublic

Authored by Fabien on Jan 25 2019, 16:51.

Details

Summary

Adds the CScripts from the wallet to the dumpwallet RPC, includes a basic test, and modifies the helptext of the dumpwallet RPC.

This does not break importwallet, but the scripts are not imported yet.

Partial backport of core PR11667
commits cdc260a, b702ae8, 9e1184d, part of 1bab9b2 and 656fde5

Depends on D2415

Test Plan
./test/functional/test_runner.py wallet_dump

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
test/functional/wallet_dump.py
108 ↗(On Diff #6937)

First thought:
We can reduce backport conflicts if we keep [multisig_addr] as script_addrs and just define script_addrs=[multisig_addr] It looks useless, but may prove less error prone when backporting, especially since script_addrs could be used below as well.

Second thought:
There will always be merge conflicts due to the linting applied.

I'll leave this one up to you.

This revision is now accepted and ready to land.Jan 25 2019, 23:22
test/functional/wallet_dump.py
108 ↗(On Diff #6937)

I asked myself the exact same question, and ended up with this solution.
This gives slightly more conflicts, but removing script_addrs will avoid inserting mistakenly segwit code again on further backport, which is a more common case (at least more common to me).

This revision was automatically updated to reflect the committed changes.