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
10-23-base58
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 1024
Build 1024: arc lint + arc unit

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.
src/base58.cpp
220

uint8_t

227

dito

238

uint8_t

240

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

dito

250

dito

261

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.
src/base58.cpp
240

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.

nits

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.