This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
fix dereference empty optional bug in api_tests/transaction_tests #5634
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
applied_transaction
signal can be given atransaction_trace
for a failed input transaction in which the receipt optional is empty.Disconnect the connection to the
applied_transaction
signal that was only meant for thesend_transaction_trigger_error_handler
test after that particular unit test is completed. This ensures that the stale signal handling lambda function is not called when applying the later transactions in the test.Furthermore, the signal handler should still check if the receipt is empty before attempting to dereference it even for the
send_transaction_trigger_error_handler
unit test, since the initialtransaction to send the deferred transaction could fail, and it is better for the official failure in the Boost tests to be from
BOOST_REQUIRE(trace)
rather than from aSIGABRT
.