Page MenuHomePhabricator

use XEC or BCH for bitcoin-qt depending on CLI setting
ClosedPublic

Authored by majcosta on Jun 12 2021, 21:54.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC97d936920f75: use XEC or BCH for bitcoin-qt depending on CLI setting
Summary
  • removed rarely used units in favor of a simpler base/subunit scheme
  • had to do some type juggling in the BitcoinUnits::factor(int) function to replace the magic numbers with the Currency class
  • fixed the bitcoin-qt tests to account for XEC's decimal places
Test Plan
ninja all check check-functional
./src/qt/bitcoin-qt -regtest

see that amounts are formatted correctly

Diff Detail

Repository
rABC Bitcoin ABC
Branch
refactor_factor_qt_function
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15993
Build 31885: Build Diffbuild-clang · lint-circular-dependencies · build-clang-tidy · build-debug · build-diff · build-without-wallet
Build 31884: arc lint + arc unit

Event Timeline

Tail of the build log:

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

Tail of the build log:

[388/445] bitcoin: testing sync_tests
[389/445] bitcoin: testing bip32_tests
[390/445] Running utility command for check-bitcoin-sync_tests
[391/445] Running utility command for check-bitcoin-bip32_tests
[392/445] bitcoin: testing txvalidationcache_tests
[393/445] Running utility command for check-bitcoin-txvalidationcache_tests
[394/445] bitcoin: testing wallet_tests
[395/445] bitcoin: testing torcontrol_tests
[396/445] Running utility command for check-bitcoin-wallet_tests
[397/445] Running utility command for check-bitcoin-torcontrol_tests
[398/445] bitcoin: testing cuckoocache_tests
[399/445] Running utility command for check-bitcoin-cuckoocache_tests
[400/445] bitcoin: testing streams_tests
[401/445] bitcoin: testing timedata_tests
[402/445] Running utility command for check-bitcoin-streams_tests
[403/445] Running utility command for check-bitcoin-timedata_tests
[404/445] bitcoin: testing validation_flush_tests
[405/445] Running utility command for check-bitcoin-validation_flush_tests
[406/445] bitcoin: testing op_reversebytes_tests
[407/445] Running utility command for check-bitcoin-op_reversebytes_tests
[408/445] bitcoin: testing compilerbug_tests
[409/445] bitcoin: testing serialize_tests
[410/445] bitcoin: testing radix_tests
[411/445] Running utility command for check-bitcoin-serialize_tests
[412/445] Running utility command for check-bitcoin-compilerbug_tests
[413/445] Running utility command for check-bitcoin-radix_tests
[414/445] bitcoin: testing checkpoints_tests
[415/445] bitcoin: testing blockcheck_tests
[416/445] bitcoin: testing script_standard_tests
[417/445] bitcoin: testing schnorr_tests
[418/445] Running utility command for check-bitcoin-checkpoints_tests
[419/445] Running utility command for check-bitcoin-blockcheck_tests
[420/445] bitcoin: testing validationinterface_tests
[421/445] Running utility command for check-bitcoin-script_standard_tests
[422/445] Running utility command for check-bitcoin-schnorr_tests
[423/445] Running utility command for check-bitcoin-validationinterface_tests
[424/445] bitcoin: testing blockstatus_tests
[425/445] bitcoin: testing util_tests
[426/445] Running utility command for check-bitcoin-blockstatus_tests
[427/445] bitcoin: testing cashaddr_tests
[428/445] Running utility command for check-bitcoin-util_tests
[429/445] Running utility command for check-bitcoin-cashaddr_tests
[430/445] bitcoin: testing script_tests
[431/445] Running utility command for check-bitcoin-script_tests
[432/445] bitcoin: testing transaction_tests
[433/445] Running utility command for check-bitcoin-transaction_tests
[434/445] bitcoin: testing versionbits_tests
[435/445] bitcoin: testing crypto_tests
[436/445] Running utility command for check-bitcoin-versionbits_tests
[437/445] Running utility command for check-bitcoin-crypto_tests
[438/445] bitcoin: testing monolith_opcodes_tests
[439/445] Running utility command for check-bitcoin-monolith_opcodes_tests
[440/445] bitcoin: testing coinselector_tests
[441/445] Running utility command for check-bitcoin-coinselector_tests
[442/445] bitcoin: testing coins_tests
[443/445] Running utility command for check-bitcoin-coins_tests
[444/445] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1

Tail of the build log:

PASS   : PaymentServerTests::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 30ms
********* Finished testing of PaymentServerTests *********
********* Start testing of RPCNestedTests *********
Config: Using QtTest library 5.11.3, Qt 5.11.3 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.3.0)
PASS   : RPCNestedTests::initTestCase()
PASS   : RPCNestedTests::rpcNestedTests()
PASS   : RPCNestedTests::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 28ms
********* Finished testing of RPCNestedTests *********
********* Start testing of CompatTests *********
Config: Using QtTest library 5.11.3, Qt 5.11.3 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.3.0)
PASS   : CompatTests::initTestCase()
PASS   : CompatTests::bswapTests()
PASS   : CompatTests::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms
********* Finished testing of CompatTests *********
********* Start testing of GUIUtilTests *********
Config: Using QtTest library 5.11.3, Qt 5.11.3 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.3.0)
PASS   : GUIUtilTests::initTestCase()
PASS   : GUIUtilTests::dummyAddressTest()
PASS   : GUIUtilTests::toCurrentEncodingTest()
PASS   : GUIUtilTests::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms
********* Finished testing of GUIUtilTests *********
********* Start testing of BitcoinAddressValidatorTests *********
Config: Using QtTest library 5.11.3, Qt 5.11.3 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.3.0)
PASS   : BitcoinAddressValidatorTests::initTestCase()
PASS   : BitcoinAddressValidatorTests::inputTests()
PASS   : BitcoinAddressValidatorTests::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms
********* Finished testing of BitcoinAddressValidatorTests *********
********* Start testing of WalletTests *********
Config: Using QtTest library 5.11.3, Qt 5.11.3 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.3.0)
PASS   : WalletTests::initTestCase()
QDEBUG : WalletTests::walletTests() TransactionTablePriv::refreshWallet
FAIL!  : WalletTests::walletTests() Compared values are not the same
   Actual   (transactionTableModel->rowCount({})): 105
   Expected (107)                                : 107
   Loc: [../../src/qt/test/wallettests.cpp(179)]
PASS   : WalletTests::cleanupTestCase()
Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 237ms
********* Finished testing of WalletTests *********
********* Start testing of AddressBookTests *********
Config: Using QtTest library 5.11.3, Qt 5.11.3 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.3.0)
PASS   : AddressBookTests::initTestCase()
QDEBUG : AddressBookTests::addressBookTests() TransactionTablePriv::refreshWallet
QWARN  : AddressBookTests::addressBookTests() This plugin does not support propagateSizeHints()
QWARN  : AddressBookTests::addressBookTests() This plugin does not support propagateSizeHints()
QDEBUG : AddressBookTests::addressBookTests() "NotifyAddressBookChanged: ecregtest:qr93wrtuhp66a4kq8w2nuvd4hjqutx5msugys7xz20 new isMine=0 purpose=send status=0"
PASS   : AddressBookTests::addressBookTests()
PASS   : AddressBookTests::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 187ms
********* Finished testing of AddressBookTests *********
~BitcoinApplication : Stopping thread
~BitcoinApplication : Stopped thread
[451/453] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Tail of the build log:

rpc_psbt.py                             | ✓ Passed  | 34 s
rpc_rawtransaction.py                   | ✓ Passed  | 36 s
rpc_scantxoutset.py                     | ✓ Passed  | 3 s
rpc_setban.py                           | ✓ Passed  | 2 s
rpc_signmessage.py                      | ✓ Passed  | 1 s
rpc_signrawtransaction.py               | ✓ Passed  | 1 s
rpc_txoutproof.py                       | ✓ Passed  | 2 s
rpc_uptime.py                           | ✓ Passed  | 1 s
rpc_users.py                            | ✓ Passed  | 6 s
rpc_whitelist.py                        | ✓ Passed  | 1 s
tool_wallet.py                          | ✓ Passed  | 4 s
wallet_abandonconflict.py               | ✓ Passed  | 7 s
wallet_address_types.py                 | ✓ Passed  | 11 s
wallet_avoidreuse.py                    | ✓ Passed  | 4 s
wallet_backup.py                        | ✓ Passed  | 28 s
wallet_balance.py                       | ✓ Passed  | 27 s
wallet_basic.py                         | ✓ Passed  | 23 s
wallet_coinbase_category.py             | ✓ Passed  | 1 s
wallet_create_tx.py                     | ✓ Passed  | 11 s
wallet_createwallet.py                  | ✓ Passed  | 2 s
wallet_createwallet.py --usecli         | ✓ Passed  | 3 s
wallet_descriptor.py                    | ✓ Passed  | 10 s
wallet_disable.py                       | ✓ Passed  | 1 s
wallet_dump.py                          | ✓ Passed  | 5 s
wallet_encryption.py                    | ✓ Passed  | 6 s
wallet_groups.py                        | ✓ Passed  | 37 s
wallet_hd.py                            | ✓ Passed  | 7 s
wallet_import_rescan.py                 | ✓ Passed  | 4 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  | 2 s
wallet_labels.py                        | ✓ Passed  | 1 s
wallet_listreceivedby.py                | ✓ Passed  | 27 s
wallet_listsinceblock.py                | ✓ Passed  | 5 s
wallet_listtransactions.py              | ✓ Passed  | 22 s
wallet_multiwallet.py                   | ✓ Passed  | 11 s
wallet_multiwallet.py --usecli          | ✓ Passed  | 12 s
wallet_reorgsrestore.py                 | ✓ Passed  | 3 s
wallet_resendwallettransactions.py      | ✓ Passed  | 4 s
wallet_txn_clone.py                     | ✓ Passed  | 2 s
wallet_txn_clone.py --mineblock         | ✓ Passed  | 3 s
wallet_txn_doublespend.py               | ✓ Passed  | 1 s
wallet_txn_doublespend.py --mineblock   | ✓ Passed  | 3 s
wallet_watchonly.py                     | ✓ Passed  | 1 s
wallet_watchonly.py --usecli            | ✓ Passed  | 1 s
wallet_zapwallettxes.py                 | ✓ Passed  | 5 s

ALL                                     | ✓ Passed  | 945 s (accumulated) 
Runtime: 200 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

hm, didn't hit that error locally. investigating.

majcosta retitled this revision from refactor: use Amount over qint64 for BitcoinUnits::factor(int) to use XEC or BCH for bitcoin-qt depending on CLI setting.
majcosta edited the summary of this revision. (Show Details)
majcosta edited the test plan for this revision. (Show Details)

additional changes needed to be carried over for this to work

undid irrelevant change in qt/test/test_main.cpp

This revision is now accepted and ready to land.Jun 13 2021, 07:55