Closed btcopenstamp closed 1 month ago
Can you also add this format into the test cases as well please.
Can you also add this format into the test cases as well please.
Sure, it’s added in https://github.com/stampchain-io/btc_stamps/pull/380/commits/d3b847bec6775b52c0df55b15f0d00474387b5f8.
Describe the bug An invalid JSON string caused a SyntaxError, resulting in the program terminating unexpectedly. The issue first appeared on the testnet during the bitname testing process. The same code is used in src20, and when added to the src20 test cases for verification, it was found that this issue indeed causes the program to terminate unexpectedly.
Branch/Release/Commit Hash of Problem Branch
dev
.To Reproduce Steps to reproduce the behavior:
Expected behavior The program can continue running without terminating.
Screenshots
Additional context The location where the code execution failed: https://github.com/stampchain-io/btc_stamps/blob/b6164a4284da464f4c92d1c2ee9c99b3f3903705/indexer/src/index_core/util.py#L314-L317
Resolve the issue by catching the SyntaxError: https://github.com/stampchain-io/btc_stamps/blob/ebdb2965bf148877919ff0597492635e9e1c540a/indexer/src/index_core/util.py#L314-L317