Page MenuHomePhabricator

Implement {Encode,Decode}Destination without CBitcoinAddress
ClosedPublic

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
arcpatch-D624
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1098
Build 1098: arc lint + arc unit

Event Timeline

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.
src/base58.cpp
220 ↗(On Diff #1604)

uint8_t

227 ↗(On Diff #1604)

dito

238 ↗(On Diff #1604)

uint8_t

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)

dito

250 ↗(On Diff #1604)

dito

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 added inline comments.
src/base58.cpp
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 edited edge metadata.
dagurval marked an inline comment as done.

nits

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