There is risk of duplicate processing of transaction
if "sign & submit" mode used for call "submit" api-method
(https://ripple.com/build/rippled-apis/#submit)
if call to one server will be timeouted the call_api
will send request to another, but the first call can
be proccesed succesfully (timeout coused by network
problems). So both the first and the second calls
can be succeeded.
Risk is more significant for Payment transaction and
less for TrustSet (but, it is possible too).
To prevent this risk occuring the following changes are
required:
- function "call_api"
- identify "sign & submit" mode by request
- request.method == "submit" and
- request.params.secret is not null
- verify if tx_blob transfered in request
- request.params.tx_blob is not null
- function "trust_set":
- call "call_api" with "sign" api-method request
- call submit function with tx_blob received in 2.1.