mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
getFormat -> getTxnFormat
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
SerializedTransaction::SerializedTransaction(TransactionType type)
|
SerializedTransaction::SerializedTransaction(TransactionType type)
|
||||||
{
|
{
|
||||||
mFormat=getFormat(type);
|
mFormat=getTxnFormat(type);
|
||||||
if(mFormat==NULL) throw(std::runtime_error("invalid transaction type"));
|
if(mFormat==NULL) throw(std::runtime_error("invalid transaction type"));
|
||||||
|
|
||||||
mMiddleTxn.giveObject(new STUInt32("Magic", TransactionMagic));
|
mMiddleTxn.giveObject(new STUInt32("Magic", TransactionMagic));
|
||||||
@@ -33,7 +33,7 @@ SerializedTransaction::SerializedTransaction(SerializerIterator& sit, int length
|
|||||||
|
|
||||||
int type=sit.get32();
|
int type=sit.get32();
|
||||||
mMiddleTxn.giveObject(new STUInt32("Type", type));
|
mMiddleTxn.giveObject(new STUInt32("Type", type));
|
||||||
mFormat=getFormat(static_cast<TransactionType>(type));
|
mFormat=getTxnFormat(static_cast<TransactionType>(type));
|
||||||
if(!mFormat) throw(std::runtime_error("Transaction has invalid type"));
|
if(!mFormat) throw(std::runtime_error("Transaction has invalid type"));
|
||||||
mMiddleTxn.giveObject(new STUInt64("Fee", sit.get64()));
|
mMiddleTxn.giveObject(new STUInt64("Fee", sit.get64()));
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ TransactionFormat InnerTxnFormats[]=
|
|||||||
{ NULL, ttINVALID }
|
{ NULL, ttINVALID }
|
||||||
};
|
};
|
||||||
|
|
||||||
TransactionFormat* getFormat(TransactionType t)
|
TransactionFormat* getTxnFormat(TransactionType t)
|
||||||
{
|
{
|
||||||
TransactionFormat* f=InnerTxnFormats;
|
TransactionFormat* f=InnerTxnFormats;
|
||||||
while(f->t_name!=NULL)
|
while(f->t_name!=NULL)
|
||||||
|
|||||||
@@ -27,5 +27,5 @@ const int TransactionMinLen=32;
|
|||||||
const int TransactionMaxLen=1048576;
|
const int TransactionMaxLen=1048576;
|
||||||
|
|
||||||
extern TransactionFormat InnerTxnFormats[];
|
extern TransactionFormat InnerTxnFormats[];
|
||||||
extern TransactionFormat* getFormat(TransactionType t);
|
extern TransactionFormat* getTxnFormat(TransactionType t);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user