mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
Expose FormatStateMessage
This commit is contained in:
parent
1f09287c66
commit
5f12263302
2 changed files with 3 additions and 1 deletions
|
@ -816,7 +816,7 @@ CAmount GetMinRelayFee(const CTransaction& tx, const CTxMemPool& pool, unsigned
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Convert CValidationState to a human-readable message for logging */
|
/** 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)",
|
return strprintf("%s%s (code %i)",
|
||||||
state.GetRejectReason(),
|
state.GetRejectReason(),
|
||||||
|
|
|
@ -257,6 +257,8 @@ void PruneAndFlush();
|
||||||
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
|
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
|
||||||
bool* pfMissingInputs, bool fOverrideMempoolLimit=false, bool fRejectAbsurdFee=false);
|
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 {
|
struct CNodeStateStats {
|
||||||
int nMisbehavior;
|
int nMisbehavior;
|
||||||
|
|
Loading…
Reference in a new issue