Page MenuHomePhabricator

refactor: allow constructing a valid CKey in place
ClosedPublic

Authored by majcosta on Aug 17 2021, 19:05.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC95c4a42ff4f0: refactor: allow constructing a valid CKey in place
Summary

allow constructing a valid CKey as syntactic sugar, less boilerplate on new code

did not change old code for now to avoid merge conflict nonsense for future backports

Test Plan
ninja all check check-functional

Diff Detail

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

Event Timeline

deadalnix requested changes to this revision.Aug 18 2021, 16:34
deadalnix added a subscriber: deadalnix.

This is not very good because you are removing the function call, with an explicit name.

Make it a static method instead. And don't take a boolean as argument as par of the API, make that two functions. CKey::MakeNewCompressedKey() and CKey::MakeNewUncompressedKey() are much clearer.

This revision now requires changes to proceed.Aug 18 2021, 16:34
This revision is now accepted and ready to land.Aug 19 2021, 12:55