Skip to content

multi: btc clone refactor#497

Merged
chappjc merged 4 commits into
decred:masterfrom
buck54321:clone-refactor
Jun 18, 2020
Merged

multi: btc clone refactor#497
chappjc merged 4 commits into
decred:masterfrom
buck54321:clone-refactor

Conversation

@buck54321
Copy link
Copy Markdown
Member

Combine and simplify a lot of code around btc clones.

  1. Creates a single base test harness for btc and clones. The harness file now just sets some environmental variables and invokes the base harness script. See ltc's new harness file for an example of use.
  2. Creates a dex/ltc package used by both the server backends and the client wallet.
  3. Combines live harness tests for client/asset/btc and client/asset/ltc (regnet_test.go) via a new client/asset/btc/livetest package. See ltc's new harness test for an example of use.

Copy link
Copy Markdown
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice dedup. Just a few suggestions.

Comment thread dex/ltc/params.go
Comment thread dex/ltc/params.go
Comment on lines +34 to +36
// Net is not the standard for LTC simnet, since they never changed it
// from the BTC values and it must be unique. It's just random.
Net: 0x9acb0442,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting bit of trivia. Can we link to something explaining this or is this a sim/regnet thing for most coins?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For us, the only place this is used is right here, and our only requirement is that it's unique to avoid ErrDuplicateNet. Should I add this explanation to the comment?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that would help

Comment thread dex/testing/btc/harness.sh
Comment thread dex/testing/btc/harness.sh Outdated
Comment thread dex/testing/btc/base-harness.sh Outdated
@chappjc chappjc added server server components client testing labels Jun 18, 2020
@chappjc chappjc merged commit 954ebec into decred:master Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server server components testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants