Page MenuHomePhabricator

Implement {Encode,Decode}Destination without CBitcoinAddress

Authored by dagurval on Oct 23 2017, 11:18.

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dagurval created this revision.Oct 23 2017, 11:18
Herald added a reviewer: Restricted Project. · View Herald TranscriptOct 23 2017, 11:18

Split out of D544.

This makes base58 consistent with cashaddr as implemented in D623

deadalnix requested changes to this revision.Nov 9 2017, 14:51
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
220 ↗(On Diff #1604)


227 ↗(On Diff #1604)


238 ↗(On Diff #1604)


240 ↗(On Diff #1604)

I'd prefers to do

if (!DecodeBase58Check(str, data)) {
    return CNoDestination();

// Do the other stuffs....

So that we don't nest deeper and deeper.

242 ↗(On Diff #1604)


250 ↗(On Diff #1604)


261 ↗(On Diff #1604)

Could you add an extra line to make the separation between the namespace and the function clearer ?

This revision now requires changes to proceed.Nov 9 2017, 14:51
dagurval marked 7 inline comments as done.Nov 13 2017, 13:46
dagurval added inline comments.
240 ↗(On Diff #1604)

I do too, but I generally don't change too much when cherry picking works by others. I'll fix this one though.

dagurval updated this revision to Diff 1714.Nov 13 2017, 13:50
dagurval edited edge metadata.
dagurval marked an inline comment as done.


deadalnix accepted this revision.Nov 13 2017, 15:45
This revision is now accepted and ready to land.Nov 13 2017, 15:45
This revision was automatically updated to reflect the committed changes.