Remove includes in .cpp files for things the corresponding .h file
already included.
Example case:
addrdb.cpp includes addrdb.h and fs.h
addrdb.h includes fs.h
Then remove the direct inclusion of fs.h in addrman.cpp and rely on the
indirect inclusion of fs.h via the included addrdb.h.
In line with the header include guideline (see #10575).
Candidates for removal found by:
#!/bin/bash for H in $(git grep "" -- "*.h" | cut -f1 -d: | uniq); do CPP=${H/%\.h/.cpp} if [[ ! -e $CPP ]]; then continue fi cat "$H" "$CPP" | grep -E "^#include " | sort | uniq -c | \ grep " 2 #include" && echo "$CPP" && echo done
Backport of Core PR10574