mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Correctly check validity for type during setType.
This commit is contained in:
@@ -30,11 +30,10 @@ SerializedTransaction::SerializedTransaction(SerializerIterator& sit) : STObject
|
||||
|
||||
mFormat = getTxnFormat(mType);
|
||||
if (!mFormat)
|
||||
throw std::runtime_error("invalid transction type");
|
||||
setType(mFormat->elements);
|
||||
if (!isValidForType())
|
||||
throw std::runtime_error("invalid transaction type");
|
||||
if (!setType(mFormat->elements))
|
||||
{
|
||||
Log(lsDEBUG) << "Transaction not valid for type " << getJson(0);
|
||||
assert(false);
|
||||
throw std::runtime_error("transaction not valid");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user