Page MenuHomePhabricator

Merge #15622: Remove global symbols: Avoid using the global namespace if possible
ClosedPublic

Authored by jasonbcox on Jun 10 2020, 22:51.

Details

Summary

fb434159d1 Remove global symbols: Avoid using the global namespace if possible (practicalswift)

Pull request description:

Remove global symbols: Avoid using the global namespace if possible.

Partially resolves #15612 ("Reduce the number of global symbols used").

Change in global symbols as reported by `nm bitcoind` before vs after:

```
$ diff -u <(nm src/bitcoind-before | c++filt | grep -E '^[0-9a-f]+ [A-Z] ' | cut -f3- -d' ' | sort -u) \
          <(nm src/bitcoind-after  | c++filt | grep -E '^[0-9a-f]+ [A-Z] ' | cut -f3- -d' ' | sort -u) \
          | grep -E '^[+-][^+-]'
-boundSockets
-cs_warnings
-eventHTTP
-fFeeEstimatesInitialized
-fLargeWorkForkFound
-fLargeWorkInvalidChainFound
-pathHandlers
-strMiscWarning[abi:cxx11]
-threadHTTP
```

ACKs for commit fb4341:

Tree-SHA512: d2f78f6188a992b0e0de8d107e2c494cfa0faa2de4fda634a1d3606d6515633bec86289cf2a2e78ffe467b17b795e2243cc459fb44e0dfe2fc69899506ff61c9

Backport of Core PR15622

Test Plan

While the instructions in the summary do not appear to work, manually inspecting like:

diff -u <(nm src/bitcoind-before) <(nm src/bitcoind-after) | less

And searching for the above instances indicates they were removed as expected.

ninja check check-functional

Diff Detail

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

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.Jun 10 2020, 23:40