TicketSequence with non-zero Sequence is an error:

Before this change any non-zero Sequence field was handled as
a non-ticketed transaction, even if a TicketSequence was
present.  We learned that this could lead to user confusion.
So the rules are tightened up.

Now if any transaction contains both a non-zero Sequence
field and a TicketSequence field then that transaction
returns a temSEQ_AND_TICKET error code.

The (deprecated) "sign" and "submit" RPC commands are tuned
up so they auto-insert a Sequence field of zero if they see
a TicketSequence in the transaction.

No amendment is needed because this change is going into
the first release that supports the TicketBatch amendment.
This commit is contained in:
Scott Schurr
2021-02-09 10:33:06 -08:00
committed by manojsdoshi
parent c138338358
commit a2e1a7a84d
5 changed files with 190 additions and 15 deletions

View File

@@ -115,9 +115,10 @@ enum TEMcodes : TERUnderlyingType {
temCANNOT_PREAUTH_SELF,
temINVALID_COUNT,
// An intermediate result used internally, should never be returned.
temUNCERTAIN,
temUNKNOWN,
temUNCERTAIN, // An internal intermediate result; should never be returned.
temUNKNOWN, // An internal intermediate result; should never be returned.
temSEQ_AND_TICKET,
};
//------------------------------------------------------------------------------

View File

@@ -152,6 +152,7 @@ transResults()
MAKE_ERROR(temINVALID_ACCOUNT_ID, "Malformed: A field contains an invalid account ID."),
MAKE_ERROR(temCANNOT_PREAUTH_SELF, "Malformed: An account may not preauthorize itself."),
MAKE_ERROR(temINVALID_COUNT, "Malformed: Count field outside valid range."),
MAKE_ERROR(temSEQ_AND_TICKET, "Transaction contains a TicketSequence and a non-zero Sequence."),
MAKE_ERROR(terRETRY, "Retry transaction."),
MAKE_ERROR(terFUNDS_SPENT, "DEPRECATED."),