getFormat -> getTxnFormat

This commit is contained in:
JoelKatz
2012-04-07 03:56:40 -07:00
parent e005db7686
commit 812445f205
3 changed files with 4 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
SerializedTransaction::SerializedTransaction(TransactionType type)
{
mFormat=getFormat(type);
mFormat=getTxnFormat(type);
if(mFormat==NULL) throw(std::runtime_error("invalid transaction type"));
mMiddleTxn.giveObject(new STUInt32("Magic", TransactionMagic));
@@ -33,7 +33,7 @@ SerializedTransaction::SerializedTransaction(SerializerIterator& sit, int length
int type=sit.get32();
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"));
mMiddleTxn.giveObject(new STUInt64("Fee", sit.get64()));

View File

@@ -45,7 +45,7 @@ TransactionFormat InnerTxnFormats[]=
{ NULL, ttINVALID }
};
TransactionFormat* getFormat(TransactionType t)
TransactionFormat* getTxnFormat(TransactionType t)
{
TransactionFormat* f=InnerTxnFormats;
while(f->t_name!=NULL)

View File

@@ -27,5 +27,5 @@ const int TransactionMinLen=32;
const int TransactionMaxLen=1048576;
extern TransactionFormat InnerTxnFormats[];
extern TransactionFormat* getFormat(TransactionType t);
extern TransactionFormat* getTxnFormat(TransactionType t);
#endif