Page MenuHomePhabricator

take lock when accessing ActiveTip in chronikbridge_tests
Needs ReviewPublic

Authored by PiRK on Mon, Nov 25, 15:55.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

Fixes a warning when compiling with clang

Test Plan
cmake .. -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++  -DBUILD_BITCOIN_CHRONIK=1
ninja check

Event Timeline

PiRK requested review of this revision.Mon, Nov 25, 15:55
PiRK planned changes to this revision.Mon, Nov 25, 16:03

there is another issue now

-:87:33: warning: cannot call function 'InvalidateBlock' while mutex 'cs_main' is held

Tail of the build log:

PASSED                         [ 20%]##teamcity[testFinished timestamp='2024-11-25T16:11:07.604' duration='9' flowId='tests.test_iguana.test_invalid_format' name='tests.test_iguana.test_invalid_format']

tests/test_iguana.py::test_invalid_inputindex ##teamcity[testStarted timestamp='2024-11-25T16:11:07.605' captureStandardOutput='false' flowId='tests.test_iguana.test_invalid_inputindex' metainfo='test_invalid_inputindex' name='tests.test_iguana.test_invalid_inputindex']
PASSED                     [ 25%]##teamcity[testFinished timestamp='2024-11-25T16:11:07.617' duration='11' flowId='tests.test_iguana.test_invalid_inputindex' name='tests.test_iguana.test_invalid_inputindex']

tests/test_iguana.py::test_sig_push_only ##teamcity[testStarted timestamp='2024-11-25T16:11:07.618' captureStandardOutput='false' flowId='tests.test_iguana.test_sig_push_only' metainfo='test_sig_push_only' name='tests.test_iguana.test_sig_push_only']
PASSED                          [ 30%]##teamcity[testFinished timestamp='2024-11-25T16:11:07.691' duration='72' flowId='tests.test_iguana.test_sig_push_only' name='tests.test_iguana.test_sig_push_only']

tests/test_iguana.py::test_script_sig_success ##teamcity[testStarted timestamp='2024-11-25T16:11:07.692' captureStandardOutput='false' flowId='tests.test_iguana.test_script_sig_success' metainfo='test_script_sig_success' name='tests.test_iguana.test_script_sig_success']
PASSED                     [ 35%]##teamcity[testFinished timestamp='2024-11-25T16:11:07.763' duration='70' flowId='tests.test_iguana.test_script_sig_success' name='tests.test_iguana.test_script_sig_success']

tests/test_iguana.py::test_script_sig_invalid_opcode_encoding ##teamcity[testStarted timestamp='2024-11-25T16:11:07.764' captureStandardOutput='false' flowId='tests.test_iguana.test_script_sig_invalid_opcode_encoding' metainfo='test_script_sig_invalid_opcode_encoding' name='tests.test_iguana.test_script_sig_invalid_opcode_encoding']
PASSED     [ 40%]##teamcity[testFinished timestamp='2024-11-25T16:11:07.812' duration='47' flowId='tests.test_iguana.test_script_sig_invalid_opcode_encoding' name='tests.test_iguana.test_script_sig_invalid_opcode_encoding']

tests/test_iguana.py::test_script_pub_key_success ##teamcity[testStarted timestamp='2024-11-25T16:11:07.813' captureStandardOutput='false' flowId='tests.test_iguana.test_script_pub_key_success' metainfo='test_script_pub_key_success' name='tests.test_iguana.test_script_pub_key_success']
PASSED                 [ 45%]##teamcity[testFinished timestamp='2024-11-25T16:11:07.899' duration='85' flowId='tests.test_iguana.test_script_pub_key_success' name='tests.test_iguana.test_script_pub_key_success']

tests/test_iguana.py::test_script_pub_key_failure ##teamcity[testStarted timestamp='2024-11-25T16:11:07.900' captureStandardOutput='false' flowId='tests.test_iguana.test_script_pub_key_failure' metainfo='test_script_pub_key_failure' name='tests.test_iguana.test_script_pub_key_failure']
PASSED                 [ 50%]##teamcity[testFinished timestamp='2024-11-25T16:11:07.939' duration='38' flowId='tests.test_iguana.test_script_pub_key_failure' name='tests.test_iguana.test_script_pub_key_failure']

tests/test_iguana.py::test_script_pub_key_empty_stack ##teamcity[testStarted timestamp='2024-11-25T16:11:07.940' captureStandardOutput='false' flowId='tests.test_iguana.test_script_pub_key_empty_stack' metainfo='test_script_pub_key_empty_stack' name='tests.test_iguana.test_script_pub_key_empty_stack']
PASSED             [ 55%]##teamcity[testFinished timestamp='2024-11-25T16:11:07.975' duration='34' flowId='tests.test_iguana.test_script_pub_key_empty_stack' name='tests.test_iguana.test_script_pub_key_empty_stack']

tests/test_iguana.py::test_script_pub_key_false_stack ##teamcity[testStarted timestamp='2024-11-25T16:11:07.976' captureStandardOutput='false' flowId='tests.test_iguana.test_script_pub_key_false_stack' metainfo='test_script_pub_key_false_stack' name='tests.test_iguana.test_script_pub_key_false_stack']
PASSED             [ 60%]##teamcity[testFinished timestamp='2024-11-25T16:11:08.011' duration='34' flowId='tests.test_iguana.test_script_pub_key_false_stack' name='tests.test_iguana.test_script_pub_key_false_stack']

tests/test_iguana.py::test_script_pub_key_cleanstack ##teamcity[testStarted timestamp='2024-11-25T16:11:08.012' captureStandardOutput='false' flowId='tests.test_iguana.test_script_pub_key_cleanstack' metainfo='test_script_pub_key_cleanstack' name='tests.test_iguana.test_script_pub_key_cleanstack']
PASSED              [ 65%]##teamcity[testFinished timestamp='2024-11-25T16:11:08.033' duration='21' flowId='tests.test_iguana.test_script_pub_key_cleanstack' name='tests.test_iguana.test_script_pub_key_cleanstack']

tests/test_iguana.py::test_redeem_script_success ##teamcity[testStarted timestamp='2024-11-25T16:11:08.034' captureStandardOutput='false' flowId='tests.test_iguana.test_redeem_script_success' metainfo='test_redeem_script_success' name='tests.test_iguana.test_redeem_script_success']
PASSED                  [ 70%]##teamcity[testFinished timestamp='2024-11-25T16:11:08.093' duration='58' flowId='tests.test_iguana.test_redeem_script_success' name='tests.test_iguana.test_redeem_script_success']

tests/test_iguana.py::test_redeem_script_error ##teamcity[testStarted timestamp='2024-11-25T16:11:08.093' captureStandardOutput='false' flowId='tests.test_iguana.test_redeem_script_error' metainfo='test_redeem_script_error' name='tests.test_iguana.test_redeem_script_error']
PASSED                    [ 75%]##teamcity[testFinished timestamp='2024-11-25T16:11:08.111' duration='16' flowId='tests.test_iguana.test_redeem_script_error' name='tests.test_iguana.test_redeem_script_error']

tests/test_iguana.py::test_redeem_script_exception ##teamcity[testStarted timestamp='2024-11-25T16:11:08.111' captureStandardOutput='false' flowId='tests.test_iguana.test_redeem_script_exception' metainfo='test_redeem_script_exception' name='tests.test_iguana.test_redeem_script_exception']
PASSED                [ 80%]##teamcity[testFinished timestamp='2024-11-25T16:11:08.135' duration='23' flowId='tests.test_iguana.test_redeem_script_exception' name='tests.test_iguana.test_redeem_script_exception']

tests/test_iguana.py::test_redeem_script_empty_stack ##teamcity[testStarted timestamp='2024-11-25T16:11:08.136' captureStandardOutput='false' flowId='tests.test_iguana.test_redeem_script_empty_stack' metainfo='test_redeem_script_empty_stack' name='tests.test_iguana.test_redeem_script_empty_stack']
PASSED              [ 85%]##teamcity[testFinished timestamp='2024-11-25T16:11:08.153' duration='16' flowId='tests.test_iguana.test_redeem_script_empty_stack' name='tests.test_iguana.test_redeem_script_empty_stack']

tests/test_iguana.py::test_redeem_script_false ##teamcity[testStarted timestamp='2024-11-25T16:11:08.154' captureStandardOutput='false' flowId='tests.test_iguana.test_redeem_script_false' metainfo='test_redeem_script_false' name='tests.test_iguana.test_redeem_script_false']
PASSED                    [ 90%]##teamcity[testFinished timestamp='2024-11-25T16:11:08.176' duration='21' flowId='tests.test_iguana.test_redeem_script_false' name='tests.test_iguana.test_redeem_script_false']

tests/test_iguana.py::test_redeem_script_cleanstack ##teamcity[testStarted timestamp='2024-11-25T16:11:08.176' captureStandardOutput='false' flowId='tests.test_iguana.test_redeem_script_cleanstack' metainfo='test_redeem_script_cleanstack' name='tests.test_iguana.test_redeem_script_cleanstack']
PASSED               [ 95%]##teamcity[testFinished timestamp='2024-11-25T16:11:08.190' duration='12' flowId='tests.test_iguana.test_redeem_script_cleanstack' name='tests.test_iguana.test_redeem_script_cleanstack']

tests/test_iguana.py::test_redeem_script_input_sigchecks ##teamcity[testStarted timestamp='2024-11-25T16:11:08.191' captureStandardOutput='false' flowId='tests.test_iguana.test_redeem_script_input_sigchecks' metainfo='test_redeem_script_input_sigchecks' name='tests.test_iguana.test_redeem_script_input_sigchecks']
PASSED          [100%]##teamcity[testFinished timestamp='2024-11-25T16:11:08.257' duration='65' flowId='tests.test_iguana.test_redeem_script_input_sigchecks' name='tests.test_iguana.test_redeem_script_input_sigchecks']


============================== 20 passed in 0.81s ==============================
[236/534] Running pow test suite
PASSED: pow test suite
[252/534] Running seeder test suite
PASSED: seeder test suite
[255/534] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-chronik failed with exit code 1

Tail of the build log:

wallet_coinbase_category.py                | ✓ Passed  | 2 s
wallet_create_tx.py                        | ✓ Passed  | 16 s
wallet_createwallet.py                     | ✓ Passed  | 6 s
wallet_createwallet.py --descriptors       | ✓ Passed  | 5 s
wallet_createwallet.py --usecli            | ✓ Passed  | 4 s
wallet_descriptor.py                       | ✓ Passed  | 17 s
wallet_disable.py                          | ✓ Passed  | 1 s
wallet_dump.py                             | ✓ Passed  | 9 s
wallet_encryption.py                       | ✓ Passed  | 6 s
wallet_encryption.py --descriptors         | ✓ Passed  | 6 s
wallet_groups.py                           | ✓ Passed  | 13 s
wallet_hd.py                               | ✓ Passed  | 10 s
wallet_hd.py --descriptors                 | ✓ Passed  | 8 s
wallet_import_rescan.py                    | ✓ Passed  | 16 s
wallet_import_with_label.py                | ✓ Passed  | 3 s
wallet_importdescriptors.py                | ✓ Passed  | 9 s
wallet_importmulti.py                      | ✓ Passed  | 7 s
wallet_importprunedfunds.py                | ✓ Passed  | 3 s
wallet_importprunedfunds.py --descriptors  | ✓ Passed  | 5 s
wallet_keypool.py                          | ✓ Passed  | 5 s
wallet_keypool_topup.py                    | ✓ Passed  | 7 s
wallet_keypool_topup.py --descriptors      | ✓ Passed  | 6 s
wallet_labels.py                           | ✓ Passed  | 6 s
wallet_labels.py --descriptors             | ✓ Passed  | 5 s
wallet_listreceivedby.py                   | ✓ Passed  | 7 s
wallet_listsinceblock.py                   | ✓ Passed  | 7 s
wallet_listsinceblock.py --descriptors     | ✓ Passed  | 7 s
wallet_listtransactions.py                 | ✓ Passed  | 5 s
wallet_listtransactions.py --descriptors   | ✓ Passed  | 6 s
wallet_multiwallet.py                      | ✓ Passed  | 43 s
wallet_multiwallet.py --descriptors        | ✓ Passed  | 43 s
wallet_multiwallet.py --usecli             | ✓ Passed  | 16 s
wallet_reorgsrestore.py                    | ✓ Passed  | 6 s
wallet_resendwallettransactions.py         | ✓ Passed  | 2 s
wallet_send.py                             | ✓ Passed  | 12 s
wallet_startup.py                          | ✓ Passed  | 4 s
wallet_timelock.py                         | ✓ Passed  | 2 s
wallet_txn_clone.py                        | ✓ Passed  | 3 s
wallet_txn_clone.py --mineblock            | ✓ Passed  | 3 s
wallet_txn_doublespend.py                  | ✓ Passed  | 3 s
wallet_txn_doublespend.py --mineblock      | ✓ Passed  | 4 s
wallet_watchonly.py                        | ✓ Passed  | 2 s
wallet_watchonly.py --usecli               | ✓ Passed  | 3 s
feature_bind_port_discover.py              | ○ Skipped | 0 s
feature_bind_port_externalip.py            | ○ Skipped | 0 s
interface_usdt_net.py                      | ○ Skipped | 0 s
interface_usdt_utxocache.py                | ○ Skipped | 0 s
interface_usdt_validation.py               | ○ Skipped | 0 s

ALL                                        | ✓ Passed  | 2029 s (accumulated) 
Runtime: 406 s

[235/534] Running pow test suite
PASSED: pow test suite
[252/534] Running seeder test suite
PASSED: seeder test suite
[255/534] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-chronik-plugins failed with exit code 1

take lock for a smaller scope, as the lock is excluded for calling GetAncestor