Client: add a --force option to tezos-client transfer
Context
The client simulates operations before injecting them in a node for two reasons:
- this prevents accidentally injecting failed operations
- this is also used to set fees and limits (gas and storage) if these are not provided.
Failed operations can however end up in blocks because of concurrency or simply because not everyone uses tezos-client.
In some related work, I need to write an integration test scenario in which a block contains a failed transaction. To do this, I propose in this MR to add a --force
option to the tezos-client transfer
command whose effect is to inject the operation in the node even if the simulation fails.
Manually testing the MR
A tezt test is provided in the MR. What it does is:
- originate the script
paramater string; storage unit; code FAILWITH
that always fails - bake a block
- call the script with
--force
- bake another block
- check that the last block indeed contains a failed operation using the following RPC:
GET /chains/main/blocks/head/operations/3/0
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.rst
for the protocol and the environment, theDevelopment Version
section ofCHANGES.md
for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR
Edited by Raphaël Cauderlier