Page MenuHomePhabricator

scripted-diff: batch-recase BanMan variables
ClosedPublic

Authored by deadalnix on Sep 21 2019, 11:56.

Details

Summary

-BEGIN VERIFY SCRIPT-
sed -i "s/banMap/banmap/g" src/banman.h src/banman.cpp
sed -i "s/netAddr/net_addr/g" src/banman.h src/banman.cpp
sed -i "s/sinceUnixEpoch/since_unix_epoch/g" src/banman.h src/banman.cpp
sed -i "s/bantimeoffset/ban_time_offset/g" src/banman.h src/banman.cpp
sed -i "s/subNet/sub_net/g" src/banman.h src/banman.cpp
sed -i "s/banReason/ban_reason/g" src/banman.h src/banman.cpp
sed -i "s/notifyUI/notify_ui/g" src/banman.h src/banman.cpp
sed -i "s/banEntry/ban_entry/g" src/banman.h src/banman.cpp
sed -i "s/nStart/n_start/g" src/banman.h src/banman.cpp
-END VERIFY SCRIPT-

This is a partial backport of Core PR14605 : https://github.com/bitcoin/bitcoin/pull/14605/commits/18185b57c32d0a43afeca4c125b9352c692923e9

Depends on D4129

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested changes to this revision.Sep 22 2019, 11:48
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/banman.h
41 ↗(On Diff #13055)

If I'm trying to see a logical naming here, I think that should be chain_params, but chainParams and chainparams are used almost everywhere through the codebase (almost 50/50).
From the developer notes: Use CamelCase for functions/methods, and lowerCamelCase for variables, so I'd better leave chainParams. That also matches the script from the summary.

This revision now requires changes to proceed.Sep 22 2019, 11:48
deadalnix added inline comments.
src/banman.h
41 ↗(On Diff #13055)

Similar to banmap or alike. Nothing here use camel case. Let's got get blocked on stuff like this.

This revision is now accepted and ready to land.Sep 22 2019, 11:59