Page MenuHomePhabricator

rpc: creates possibility to preserve labels on importprivkey

Authored by deadalnix on May 20 2020, 23:26.


  • changes importprivkey behavior to overwrite existent label if one

is passed and keep existing ones if no label is passed

  • tests behavior of importprivkey on existing address labels and

different same key destination

This is a backport of Core PR13381 .

I had to modify heavily the last test to create a P2SH manually. Bitcoin Core does produce a segwit wrapped into P2SH address by default so this isn't a problem for them.

Test Plan
ninja all check-all

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

majcosta requested changes to this revision.May 20 2020, 23:51
majcosta added inline comments.
29 ↗(On Diff #20404)

add to doc/ and delete this one

This revision now requires changes to proceed.May 20 2020, 23:51
29 ↗(On Diff #20404)


This revision is now accepted and ready to land.May 21 2020, 00:52
This revision was landed with ongoing or failed builds.May 21 2020, 01:19
This revision was automatically updated to reflect the committed changes.