Page MenuHomePhabricator

Remove redundant CChainParams from ConnectBlock
ClosedPublic

Authored by jasonbcox on Jan 22 2018, 05:17.

Details

Summary

T166: Cleanup redudant code since config.GetChainParams() can be used in place of the CChainParams parameter.

Test Plan

make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cblock
Lint
Lint Passed
SeverityLocationCodeMessage
Auto-Fixsrc/validation.cpp:1CFMTCode style violation
Unit
No Test Coverage
Build Status
Buildable 1721
Build 1721: arc lint + arc unit

Event Timeline

deadalnix requested changes to this revision.Jan 22 2018, 14:10
deadalnix added inline comments.
src/validation.cpp
1904

Sounds like you have a lot of GetChainParams in there. You should probably assign this to a local variable.

This revision now requires changes to proceed.Jan 22 2018, 14:10
jasonbcox marked an inline comment as done.

Added local variable for chainParams

deadalnix requested changes to this revision.Jan 23 2018, 21:41
deadalnix added inline comments.
src/validation.cpp
1904 ↗(On Diff #2710)
const Consensus::Params &consensusParams = config.GetChainParams().GetConsensus();
This revision now requires changes to proceed.Jan 23 2018, 21:41

I liked Matias's solution to this better because it's cleaner (see D1028).

jasonbcox added inline comments.
src/validation.cpp
1904 ↗(On Diff #2710)

Updated my diff in the same time that you commented on this. I saw it in Matias's diff and liked it better. :)

This revision is now accepted and ready to land.Jan 23 2018, 21:46
This revision was automatically updated to reflect the committed changes.
jasonbcox marked an inline comment as done.