Page MenuHomePhabricator

[explorer] Show as much token tx information as possible when the genesis info is missing
ClosedPublic

Authored by Fabien on Mon, Jan 6, 19:40.

Details

Summary

Since D17470 the explorer don't fail to show a transaction with a non-existing token id. But it also display not much information on the tx page due to missing the genesis info. This diff improves the page under this condition so it shows at least the token type and the error.

Depends on D17470.

Test Plan

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Mon, Jan 6, 19:40

Tail of the build log:

---- test_tx stdout ----
Error: HTTP request error

Caused by:
   0: error sending request for url (https://chronik.e.cash/tx/f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16): error trying to connect: error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1889: (certificate has expired)
   1: error trying to connect: error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1889: (certificate has expired)
   2: error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1889: (certificate has expired)
   3: error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1889:

Location:
    /work/modules/bitcoinsuite-chronik-client/src/lib.rs:257:14

---- test_slpv2_token stdout ----
Error: HTTP request error

Caused by:
   0: error sending request for url (https://chronik.e.cash/token/cdcdcdcdcdc9dda4c92bb1145aa84945c024346ea66fd4b699e344e45df2e145): error trying to connect: error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1889: (certificate has expired)
   1: error trying to connect: error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1889: (certificate has expired)
   2: error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1889: (certificate has expired)
   3: error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1889:

Location:
    /work/modules/bitcoinsuite-chronik-client/src/lib.rs:257:14

---- test_tx_missing stdout ----
thread 'test_tx_missing' panicked at modules/bitcoinsuite-chronik-client/tests/test_chronik_client.rs:129:5:
assertion failed: `(left == right)`

Diff < left / right > :
<HttpRequestError
>ChronikError {
>    status_code: 404,
>    error: Error {
>        msg: "404: Transaction 0000000000000000000000000000000000000000000000000000000000000000 not found in the index",
>    },
>    error_msg: "404: Transaction 0000000000000000000000000000000000000000000000000000000000000000 not found in the index",
>}




failures:
    test_block
    test_block_txs
    test_blockchain_info
    test_blocks
    test_broadcast_tx
    test_broadcast_txs
    test_history
    test_raw_tx
    test_raw_tx_missing
    test_slpv1_token
    test_slpv2_token
    test_tx
    test_tx_missing

test result: FAILED. 0 passed; 13 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.19s

error: test failed, to rerun pass `-p bitcoinsuite-chronik-client --test test_chronik_client`
Build build-explorer failed with exit code 101
This revision is now accepted and ready to land.Tue, Jan 7, 08:55