瀏覽代碼

Expose FormatStateMessage

tags/v0.15.1
Alex Morcos 5 年之前
父節點
當前提交
5f12263302
共有 2 個檔案被更改,包括 3 行新增1 行删除
  1. 1
    1
      src/main.cpp
  2. 2
    0
      src/main.h

+ 1
- 1
src/main.cpp 查看文件

@@ -816,7 +816,7 @@ CAmount GetMinRelayFee(const CTransaction& tx, const CTxMemPool& pool, unsigned
}

/** Convert CValidationState to a human-readable message for logging */
static std::string FormatStateMessage(const CValidationState &state)
std::string FormatStateMessage(const CValidationState &state)
{
return strprintf("%s%s (code %i)",
state.GetRejectReason(),

+ 2
- 0
src/main.h 查看文件

@@ -257,6 +257,8 @@ void PruneAndFlush();
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
bool* pfMissingInputs, bool fOverrideMempoolLimit=false, bool fRejectAbsurdFee=false);

/** Convert CValidationState to a human-readable message for logging */
std::string FormatStateMessage(const CValidationState &state);

struct CNodeStateStats {
int nMisbehavior;

Loading…
取消
儲存