Closed heifner closed 6 months ago
Does not fix issue reported in #2310. This PR is to make reporting of errors better.
Use getBlockNum() and getBlockID() for accessing get transaction-status results.
getBlockNum()
getBlockID()
get transaction-status
IN_BLOCK status returns block_number and block_id. LOCALLY_APPLIED status returns head_number and head_id.
IN_BLOCK
block_number
block_id
LOCALLY_APPLIED
head_number
head_id
cmd={/__w/leap/leap/build/bin/cleos --url http://localhost:8891 --wallet-url http://localhost:9899 --no-auto-keosd get transaction-status fb2a71ec0e490bf8989f1cfaa9f6a16c0367ec8078f8492477026ff7c5029be4} cout={b'{\n "state": "IN_BLOCK",\n "block_number": 199,\n "block_id": "000000c7bfc26343def2c691bd7fed57880c320a9cef930fa8f16ffbb86e23c1",\n "block_timestamp": "2024-03-27T17:12:45.000",\n "expiration": "2024-03-27T17:14:12.000",\n "head_number": 200,\n "head_id": "000000c898855776f59986582451d5db32dea5d9a728b947b2bbc1afab63bb75",\n "head_timestamp": "2024-03-27T17:12:45.500",\n "irreversible_number": 195,\n "irreversible_id": "000000c3d939ef3af111e203cedbb711cf2e56449df8b27d5cee7cef7241677b",\n "irreversible_timestamp": "2024-03-27T17:12:37.000",\n "earliest_tracked_block_id": "0000002033fc0440771c1748b11c16aa0d3994e4df53b5c52749677e85726b77",\n "earliest_tracked_block_number": 32\n}\n'}
and
cmd={/__w/leap/leap/build/bin/cleos --url http://localhost:8891 --wallet-url http://localhost:9899 --no-auto-keosd get transaction-status fb2a71ec0e490bf8989f1cfaa9f6a16c0367ec8078f8492477026ff7c5029be4} cout={b'{\n "state": "LOCALLY_APPLIED",\n "expiration": "2024-03-27T17:14:12.000",\n "head_number": 204,\n "head_id": "000000cc0772681d58d77c81e61ebf0f71270d539dc8cf8b51e4b24ce5bcd010",\n "head_timestamp": "2024-03-27T17:12:41.500",\n "irreversible_number": 201,\n "irreversible_id": "000000c982efd5f794d1f90c7b4b38e5d495cb52fbf7338ad4fcdd25e57264a9",\n "irreversible_timestamp": "2024-03-27T17:12:40.000",\n "earliest_tracked_block_id": "0000002033fc0440771c1748b11c16aa0d3994e4df53b5c52749677e85726b77",\n "earliest_tracked_block_number": 32\n}\n'}
Note:start group: IF category: TEST summary: Update test with improved error logging. Note:end
Does not fix issue reported in #2310. This PR is to make reporting of errors better.
Use
getBlockNum()
andgetBlockID()
for accessingget transaction-status
results.IN_BLOCK
status returnsblock_number
andblock_id
.LOCALLY_APPLIED
status returnshead_number
andhead_id
.and