Open mvandeberg opened 6 years ago
A couple of my assumptions when I wrote #2092.
handle_block
calls accept_block
. Without this synchronization mechanism, if the p2p code were to block, it was already going to block because their is no multi-tasking in database::push_block
. We can safely assume that blocking from bracket to bracket in accept_block
is safe. Using the future was needed because the previous versions of accept_transaction
and accept_block
had return and exception semantics that were relied upon by callers.
It satisfies both the requirements of bracket to bracket blocking and a signal for propagating return values and exceptions.
Noted in #2092:
The patch appears to be working locally. Nevertheless, we should confirm the behavior is as suspected and document it.