Page MenuHomePhabricator

refactor: Use uint16_t instead of unsigned short
ClosedPublic

Authored by PiRK on Aug 31 2021, 07:36.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC6f8205e0701d: refactor: Use uint16_t instead of unsigned short
Summary

This is a backport of core#19314

Test Plan

ninja all check-all

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Aug 31 2021, 07:36

Tail of the build log:

[393/452] bitcoin: testing bswap_tests
[394/452] Running utility command for check-bitcoin-blockfilter_tests
[395/452] bitcoin: testing finalization_tests
[396/452] Running utility command for check-bitcoin-multisig_tests
[397/452] Running utility command for check-bitcoin-blockfilter_index_tests
[398/452] bitcoin: testing scheduler_tests
[399/452] Running utility command for check-bitcoin-bswap_tests
[400/452] bitcoin: testing coins_tests
[401/452] Running utility command for check-bitcoin-wallet_tests
[402/452] bitcoin: testing crypto_tests
[403/452] bitcoin: testing merkleblock_tests
[404/452] Running utility command for check-bitcoin-txvalidationcache_tests
[405/452] bitcoin: testing schnorr_tests
[406/452] bitcoin: testing bip32_tests
[407/452] Running utility command for check-bitcoin-init_tests
[408/452] Running utility command for check-bitcoin-scheduler_tests
[409/452] bitcoin: testing sync_tests
[410/452] bitcoin: testing script_tests
[411/452] Running utility command for check-bitcoin-key_tests
[412/452] bitcoin: testing torcontrol_tests
[413/452] Running utility command for check-bitcoin-coins_tests
[414/452] Running utility command for check-bitcoin-sync_tests
[415/452] bitcoin: testing serialize_tests
[416/452] bitcoin: testing settings_tests
[417/452] Running utility command for check-bitcoin-config_tests
[418/452] bitcoin: testing streams_tests
[419/452] Running utility command for check-bitcoin-wallet_crypto_tests
[420/452] bitcoin: testing timedata_tests
[421/452] Running utility command for check-bitcoin-serialize_tests
[422/452] bitcoin: testing validation_flush_tests
[423/452] Running utility command for check-bitcoin-op_reversebytes_tests
[424/452] bitcoin: testing compilerbug_tests
[425/452] Running utility command for check-bitcoin-blockcheck_tests
[426/452] bitcoin: testing checkpoints_tests
[427/452] Running utility command for check-bitcoin-settings_tests
[428/452] bitcoin: testing validationinterface_tests
[429/452] Running utility command for check-bitcoin-validation_flush_tests
[430/452] Running utility command for check-bitcoin-schnorr_tests
[431/452] bitcoin: testing versionbits_tests
[432/452] bitcoin: testing blockstatus_tests
[433/452] Running utility command for check-bitcoin-blockindex_tests
[434/452] Running utility command for check-bitcoin-streams_tests
[435/452] bitcoin: testing cashaddr_tests
[436/452] bitcoin: testing monolith_opcodes_tests
[437/452] Running utility command for check-bitcoin-validationinterface_tests
[438/452] Running utility command for check-bitcoin-compilerbug_tests
[439/452] Running utility command for check-bitcoin-cashaddr_tests
[440/452] Running utility command for check-bitcoin-monolith_opcodes_tests
[441/452] Running utility command for check-bitcoin-blockstatus_tests
[442/452] Running utility command for check-bitcoin-script_tests
[443/452] Running utility command for check-bitcoin-merkleblock_tests
[444/452] Running utility command for check-bitcoin-torcontrol_tests
[445/452] Running utility command for check-bitcoin-crypto_tests
[446/452] Running utility command for check-bitcoin-checkpoints_tests
[447/452] Running utility command for check-bitcoin-versionbits_tests
[448/452] Running utility command for check-bitcoin-bip32_tests
[449/452] Running utility command for check-bitcoin-finalization_tests
[450/452] Running utility command for check-bitcoin-timedata_tests
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

rpc_psbt.py                             | ✓ Passed  | 22 s
rpc_rawtransaction.py                   | ✓ Passed  | 14 s
rpc_scantxoutset.py                     | ✓ Passed  | 3 s
rpc_setban.py                           | ✓ Passed  | 2 s
rpc_signmessage.py                      | ✓ Passed  | 1 s
rpc_signrawtransaction.py               | ✓ Passed  | 2 s
rpc_txoutproof.py                       | ✓ Passed  | 2 s
rpc_uptime.py                           | ✓ Passed  | 1 s
rpc_users.py                            | ✓ Passed  | 5 s
rpc_whitelist.py                        | ✓ Passed  | 1 s
tool_wallet.py                          | ✓ Passed  | 4 s
wallet_abandonconflict.py               | ✓ Passed  | 7 s
wallet_address_types.py                 | ✓ Passed  | 15 s
wallet_avoidreuse.py                    | ✓ Passed  | 3 s
wallet_backup.py                        | ✓ Passed  | 28 s
wallet_balance.py                       | ✓ Passed  | 23 s
wallet_basic.py                         | ✓ Passed  | 33 s
wallet_coinbase_category.py             | ✓ Passed  | 1 s
wallet_create_tx.py                     | ✓ Passed  | 5 s
wallet_createwallet.py                  | ✓ Passed  | 2 s
wallet_createwallet.py --usecli         | ✓ Passed  | 2 s
wallet_descriptor.py                    | ✓ Passed  | 6 s
wallet_disable.py                       | ✓ Passed  | 1 s
wallet_dump.py                          | ✓ Passed  | 4 s
wallet_encryption.py                    | ✓ Passed  | 5 s
wallet_groups.py                        | ✓ Passed  | 39 s
wallet_hd.py                            | ✓ Passed  | 6 s
wallet_import_rescan.py                 | ✓ Passed  | 5 s
wallet_import_with_label.py             | ✓ Passed  | 1 s
wallet_importdescriptors.py             | ✓ Passed  | 4 s
wallet_importmulti.py                   | ✓ Passed  | 3 s
wallet_importprunedfunds.py             | ✓ Passed  | 2 s
wallet_keypool.py                       | ✓ Passed  | 3 s
wallet_keypool_topup.py                 | ✓ Passed  | 3 s
wallet_labels.py                        | ✓ Passed  | 2 s
wallet_listreceivedby.py                | ✓ Passed  | 24 s
wallet_listsinceblock.py                | ✓ Passed  | 4 s
wallet_listtransactions.py              | ✓ Passed  | 21 s
wallet_multiwallet.py                   | ✓ Passed  | 43 s
wallet_multiwallet.py --usecli          | ✓ Passed  | 18 s
wallet_reorgsrestore.py                 | ✓ Passed  | 3 s
wallet_resendwallettransactions.py      | ✓ Passed  | 5 s
wallet_txn_clone.py                     | ✓ Passed  | 3 s
wallet_txn_clone.py --mineblock         | ✓ Passed  | 3 s
wallet_txn_doublespend.py               | ✓ Passed  | 2 s
wallet_txn_doublespend.py --mineblock   | ✓ Passed  | 3 s
wallet_watchonly.py                     | ✓ Passed  | 1 s
wallet_watchonly.py --usecli            | ✓ Passed  | 2 s
wallet_zapwallettxes.py                 | ✓ Passed  | 5 s

ALL                                     | ✓ Passed  | 1034 s (accumulated) 
Runtime: 207 s

----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK

ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1
Fabien requested changes to this revision.Aug 31 2021, 12:24
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/addrdb.cpp
11 ↗(On Diff #29680)

should be in its own section

src/net.cpp
128 ↗(On Diff #29680)

Use the constructor

src/netaddress.cpp
6 ↗(On Diff #29680)

dito

src/netbase.cpp
871 ↗(On Diff #29680)

dito

874 ↗(On Diff #29680)

dito

src/qt/optionsmodel.h
9 ↗(On Diff #29680)

dito

This revision now requires changes to proceed.Aug 31 2021, 12:24

address review.
In netaddress.cpp, de-duplicate #include <cstdint>.

This is probably a good idea to add a linter to auto fix this, just like it is done for uint8_t .

This revision is now accepted and ready to land.Aug 31 2021, 15:58
Fabien requested changes to this revision.Aug 31 2021, 16:01

Please update the seeder as well

This revision now requires changes to proceed.Aug 31 2021, 16:01

update src/seeder files as well

This revision is now accepted and ready to land.Sep 1 2021, 06:34