Improve transaction error condition handling (RIPD-1578, RIPD-1593):

As described in #2314, when an offer executed with `Fill or Kill`
semantics, the server would return `tesSUCCESS` even if the order
couldn't be filled and was aborted. This would require additional
processing of metadata by users to determine the effects of the
transaction.

This commit introduces the `fix1578` amendment which, if enabled,
will cause the server to return the new `tecKILLED` error code
instead of `tesSUCCESS` for `Fill or Kill` orders that could not
be filled.

Additionally, the `fix1578` amendment will prevent the setting of
the `No Ripple` flag on trust lines with negative balance; trying
to set the flag on such a trust line will fail with the new error
code `tecNEGATIVE_BALANCE`.
This commit is contained in:
Scott Schurr
2018-06-15 14:56:13 -07:00
committed by Nik Bougalis
parent 4dcb3c9199
commit 4104778067
9 changed files with 153 additions and 59 deletions

View File

@@ -73,6 +73,7 @@ transResults()
{ tecINVARIANT_FAILED, { "tecINVARIANT_FAILED", "One or more invariants for the transaction were not satisfied." } },
{ tecEXPIRED, { "tecEXPIRED", "Expiration time is passed." } },
{ tecDUPLICATE, { "tecDUPLICATE", "Ledger object already exists." } },
{ tecKILLED, { "tecKILLED", "FillOrKill offer killed." } },
{ tefALREADY, { "tefALREADY", "The exact transaction was already in this ledger." } },
{ tefBAD_ADD_AUTH, { "tefBAD_ADD_AUTH", "Not authorized to add account." } },