Page MenuHomePhabricator

[electrum] deduplicate the ECPrivkey.sign code
ClosedPublic

Authored by PiRK on Wed, Aug 28, 07:24.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC63d3ef0463e2: [electrum] deduplicate the ECPrivkey.sign code
Summary

sign_transaction and sign_message use very similar code, with just the decoding and encoding functions changing. Wrap this code in a new sign method called by the other two methods. This will make it simpler to switch the signing code to not rely on the ecdsa library.

Partial backport of https://github.com/spesmilo/electrum/commit/ac94d6d055807ecb3b2ba044b0bcd9a12a9b3b7c

Depends on D16685

Test Plan

python test_runner.py

Diff Detail

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