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.
Fixed crashes on exit by shutting down the network before shutting down plugins. For good measure, I also added a small 1 second sleep so that any async calls could be processed.
Fixed crash on transaction confirmation by restructuring on_applied_block into a single ASYNC call that captured the signed_block. Rather than deleting the callback after calling it, I simply set it to an empty lambda. Then on expiration I call everything and clean up.
I also changed the > comparison for expiration to >= just incase there was some overlap.
Lastly I fixed a warning where handle_block() would exit without a return value if it wasn't "running". This could cause the stack to get corrupted and crash on exit.