Shell/RPC: add node sync option to inject operation
What
Adds force_node_sync flag to operation injection RPC.
Why
Clients who are injecting operations want to know that the node is synchronised on injection so that they can be sure that their operation would be propagated. Polling for synchronisation before injection doesn't work for some clients in an environment with restrictive rate limits. Monitoring bootstrap status might work but it seems is the less preferred approach by clients.
Note: there is also a desire to add this flag to get_balance and other rpcs - https://docs.google.com/document/d/19Ao60sKRJswCiMmmt-k_xSLkIDTVpbLPrqgRO744X8c/edit?pli=1
How
Add an optional (defaults to false) force_node_sync flag to inject_operation in the validator then propagate the changes "upwards" to the injection_directory and service. If force_node_sync is set, the injection will fail if the node is not synchronised.
Manually testing the MR
TODO: tezt tests
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR