HomePhabricator

minor refactor to use ranged_for, auto and const-ness

Description

minor refactor to use ranged_for, auto and const-ness

Summary:
as above

edit: also renamed a variable that used Hungarian notation

Test Plan:
created a minor cpp unit test which replicated the desired behavior in the code. that being insufficient, as soon as my node syncs I'll prune it, set a breakpoint and verify correct behavior

edit: To check for correct behavior, wrote a test that creates empty blk000xx.dat and rev000xx.dat files from 0 to 28, with contiguous and non-contiguous segments, and runs the CleanupBlockRevFiles() function. then, this test will be run with clang's address, memory and undefined sanitizers, in turn.

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D4495

Details

Provenance
majcostaAuthored on Nov 20 2019, 19:06
majcostaPushed on Nov 22 2019, 14:28
Reviewer
Restricted Owners Package
Differential Revision
D4495: minor refactor to use ranged_for, auto and const-ness
Parents
rABC30e956385c06: test: Make bloom tests deterministic
Branches
Unknown
Tags
Unknown