From 9c31daad082209dc63457357349daa2c3083c931 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 15 Oct 2012 20:36:14 -0700 Subject: [PATCH] Disallow negative amounts for CreditSet. --- src/TransactionErr.h | 5 +++-- src/TransactionMeta.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/TransactionErr.h b/src/TransactionErr.h index 97a9b1525..652a23a21 100644 --- a/src/TransactionErr.h +++ b/src/TransactionErr.h @@ -108,11 +108,12 @@ enum TER // aka TransactionEngineResult tepPATH_PARTIAL, }; +#define isTelLocal(x) ((x) >= telLOCAL_ERROR && (x) < temMALFORMED) #define isTemMalformed(x) ((x) >= temMALFORMED && (x) < tefFAILURE) #define isTefFailure(x) ((x) >= tefFAILURE && (x) < terRETRY) -#define isTepPartial(x) ((x) >= tepPATH_PARTIAL) -#define isTepSuccess(x) ((x) >= tesSUCCESS) #define isTerRetry(x) ((x) >= terRETRY && (x) < tesSUCCESS) +#define isTepSuccess(x) ((x) >= tesSUCCESS) +#define isTepPartial(x) ((x) >= tepPATH_PARTIAL) bool transResultInfo(TER terCode, std::string& strToken, std::string& strHuman); std::string transToken(TER terCode); diff --git a/src/TransactionMeta.cpp b/src/TransactionMeta.cpp index 3e0cd4035..d1372ebdc 100644 --- a/src/TransactionMeta.cpp +++ b/src/TransactionMeta.cpp @@ -280,7 +280,7 @@ Json::Value TransactionMetaSet::getJson(int v) const { Json::Value ret = Json::objectValue; - ret["transaction_id"] = mTransactionID.GetHex(); + ret["hash"] = mTransactionID.GetHex(); ret["ledger"] = mLedger; Json::Value e = Json::arrayValue; @@ -330,3 +330,4 @@ void TransactionMetaSet::swap(TransactionMetaSet& s) mNodes.swap(s.mNodes); } +// vim:ts=4