Skip to content

Conversation

kallewoof
Copy link
Contributor

@kallewoof kallewoof commented Jan 27, 2017

This is a sub-set of #9235, including only the wallet dir and util* files.

Same-binaries check (2017-03-08):

$ ../bitcoin-maintainer-tools/build-for-compare.py 6996e066b538f03b8aa1f617dbb959b57ff6e727 a57845c20e96825f1256e6b7f46d67d205c859e0 --executables "src/bitcoind,src/bitcoin-cli,src/bitcoin-tx"
[...]
make[1]: Leaving directory '/tmp/repo/src'
>>> [do_build] Copying object files...
>>> [do_build] Performing basic analysis pass...
>>> [do_build] Use these commands to compare results:
>>> [do_build] $ sha256sum /tmp/compare/*.stripped
>>> [do_build] $ git diff -W --word-diff /tmp/compare/6996e066b538f03b8aa1f617dbb959b57ff6e727 /tmp/compare/a57845c20e96825f1256e6b7f46d67d205c859e0
$ sha256sum /tmp/compare/*.stripped
1bfe4311525db52b9c5d5c2b0b9ff6f8e3f3cfda0dcb1e5cd83b08b767a4a902  /tmp/compare/bitcoin-cli.6996e066b538f03b8aa1f617dbb959b57ff6e727.stripped
1bfe4311525db52b9c5d5c2b0b9ff6f8e3f3cfda0dcb1e5cd83b08b767a4a902  /tmp/compare/bitcoin-cli.a57845c20e96825f1256e6b7f46d67d205c859e0.stripped
fb0f6796776dc39e422910572a216cbad87f607cbb4920bd12d2c483cc51e231  /tmp/compare/bitcoind.6996e066b538f03b8aa1f617dbb959b57ff6e727.stripped
fb0f6796776dc39e422910572a216cbad87f607cbb4920bd12d2c483cc51e231  /tmp/compare/bitcoind.a57845c20e96825f1256e6b7f46d67d205c859e0.stripped
fe4107fcc49ba17cdfbb0edc357373ea37d833d5691af7b2367758e8b3e1d45c  /tmp/compare/bitcoin-tx.6996e066b538f03b8aa1f617dbb959b57ff6e727.stripped
fe4107fcc49ba17cdfbb0edc357373ea37d833d5691af7b2367758e8b3e1d45c  /tmp/compare/bitcoin-tx.a57845c20e96825f1256e6b7f46d67d205c859e0.stripped
$ git diff -W --word-diff /tmp/compare/6996e066b538f03b8aa1f617dbb959b57ff6e727 /tmp/compare/a57845c20e96825f1256e6b7f46d67d205c859e0
$ 

The affected files and namespaces:

util.cpp:                 std
utilmoneystr.cpp:         std
utilstrencodings.cpp:     std
utiltime.cpp:             std [unused]
wallet/db.cpp:            std
wallet/rpcdump.cpp:       std
wallet/rpcwallet.cpp:     std
wallet/test/wallet_tests.cpp: std
wallet/wallet.cpp:        std
wallet/walletdb.cpp:      std

src/util.cpp Outdated
@@ -97,15 +97,15 @@ namespace boost {

} // namespace boost

using namespace std;
// blank space for binary match
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

@kallewoof kallewoof Jan 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The binary check tool trips over the LOCK macros. If a line is removed, the binary check ends up failing.

Copy link
Contributor Author

@kallewoof kallewoof Jan 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In hindsight I realize that comment is very unhelpful. I removed it.

@kallewoof kallewoof force-pushed the no-using-namespace-wallet-util branch from 854e962 to df8b249 Compare January 30, 2017 12:26
@@ -97,15 +97,15 @@ namespace boost {

} // namespace boost

using namespace std;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bike-shedding: you could just remove the line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of macros which use the line number, removing this line breaks the same-binaries-check, unfortunately.

@jtimon
Copy link
Contributor

jtimon commented Feb 24, 2017

utACK df8b249
Needs rebase

@kallewoof kallewoof force-pushed the no-using-namespace-wallet-util branch from df8b249 to bc74809 Compare February 24, 2017 04:37
@kallewoof
Copy link
Contributor Author

kallewoof commented Feb 24, 2017

Rebased & redid same-binaries check.

@laanwj
Copy link
Member

laanwj commented Mar 8, 2017

Needs another rebase, sorry.

@laanwj laanwj self-assigned this Mar 8, 2017
@kallewoof kallewoof force-pushed the no-using-namespace-wallet-util branch from bc74809 to a57845c Compare March 8, 2017 16:54
@kallewoof
Copy link
Contributor Author

@laanwj Rebased & redid same binaries check (6996e06 vs a57845c). And no worries at all. I knew this might take awhile. :)

@laanwj laanwj merged commit a57845c into bitcoin:master Mar 9, 2017
laanwj added a commit that referenced this pull request Mar 9, 2017
…til*

a57845c Refactor: Remove using namespace <xxx> from util* (Karl-Johan Alm)
8a52281 Refactor: Remove using namespace <xxx> from wallet/ (Karl-Johan Alm)

Tree-SHA512: cd06b569fee0ce25db753ade5ee694b582733a8883bfd62a27613020266d2a902af079ef23b58a5412f7af4afd7681e689af3c7780e5ea00c77b16d144d72db5
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Feb 21, 2018
…et/ & util*

a57845c Refactor: Remove using namespace <xxx> from util* (Karl-Johan Alm)
8a52281 Refactor: Remove using namespace <xxx> from wallet/ (Karl-Johan Alm)

Tree-SHA512: cd06b569fee0ce25db753ade5ee694b582733a8883bfd62a27613020266d2a902af079ef23b58a5412f7af4afd7681e689af3c7780e5ea00c77b16d144d72db5
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
…et/ & util*

a57845c Refactor: Remove using namespace <xxx> from util* (Karl-Johan Alm)
8a52281 Refactor: Remove using namespace <xxx> from wallet/ (Karl-Johan Alm)

Tree-SHA512: cd06b569fee0ce25db753ade5ee694b582733a8883bfd62a27613020266d2a902af079ef23b58a5412f7af4afd7681e689af3c7780e5ea00c77b16d144d72db5
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 21, 2019
…et/ & util*

a57845c Refactor: Remove using namespace <xxx> from util* (Karl-Johan Alm)
8a52281 Refactor: Remove using namespace <xxx> from wallet/ (Karl-Johan Alm)

Tree-SHA512: cd06b569fee0ce25db753ade5ee694b582733a8883bfd62a27613020266d2a902af079ef23b58a5412f7af4afd7681e689af3c7780e5ea00c77b16d144d72db5
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 27, 2019
…et/ & util*

a57845c Refactor: Remove using namespace <xxx> from util* (Karl-Johan Alm)
8a52281 Refactor: Remove using namespace <xxx> from wallet/ (Karl-Johan Alm)

Tree-SHA512: cd06b569fee0ce25db753ade5ee694b582733a8883bfd62a27613020266d2a902af079ef23b58a5412f7af4afd7681e689af3c7780e5ea00c77b16d144d72db5
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 29, 2019
…et/ & util*

a57845c Refactor: Remove using namespace <xxx> from util* (Karl-Johan Alm)
8a52281 Refactor: Remove using namespace <xxx> from wallet/ (Karl-Johan Alm)

Tree-SHA512: cd06b569fee0ce25db753ade5ee694b582733a8883bfd62a27613020266d2a902af079ef23b58a5412f7af4afd7681e689af3c7780e5ea00c77b16d144d72db5
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 28, 2019
@kallewoof kallewoof deleted the no-using-namespace-wallet-util branch October 17, 2019 08:47
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants