mirror of
https://github.com/XRPLF/rippled.git
synced 2026-10-03 10:18:26 +00:00
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:
committed by
manojsdoshi
parent
c138338358
commit
a2e1a7a84d
@@ -441,7 +441,9 @@ transactionPreProcessImpl(
|
||||
{
|
||||
if (!tx_json.isMember(jss::Sequence))
|
||||
{
|
||||
if (!sle)
|
||||
bool const hasTicketSeq =
|
||||
tx_json.isMember(sfTicketSequence.jsonName);
|
||||
if (!hasTicketSeq && !sle)
|
||||
{
|
||||
JLOG(j.debug())
|
||||
<< "transactionSign: Failed to find source account "
|
||||
@@ -449,7 +451,8 @@ transactionPreProcessImpl(
|
||||
|
||||
return rpcError(rpcSRC_ACT_NOT_FOUND);
|
||||
}
|
||||
tx_json[jss::Sequence] = app.getTxQ().nextQueuableSeq(sle).value();
|
||||
tx_json[jss::Sequence] =
|
||||
hasTicketSeq ? 0 : app.getTxQ().nextQueuableSeq(sle).value();
|
||||
}
|
||||
|
||||
if (!tx_json.isMember(jss::Flags))
|
||||
|
||||
Reference in New Issue
Block a user