2019-04-02 17:03:37 -04:00
|
|
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
|
|
|
// Copyright (c) 2009-2019 The Bitcoin Core developers
|
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
#include <util/validation.h>
|
|
|
|
|
|
|
|
#include <consensus/validation.h>
|
|
|
|
#include <tinyformat.h>
|
|
|
|
|
2019-10-24 11:35:42 -04:00
|
|
|
/** Convert ValidationState to a human-readable message for logging */
|
|
|
|
std::string FormatStateMessage(const ValidationState &state)
|
2019-04-02 17:03:37 -04:00
|
|
|
{
|
2019-10-10 11:19:42 -04:00
|
|
|
return strprintf("%s%s",
|
2019-04-02 17:03:37 -04:00
|
|
|
state.GetRejectReason(),
|
2019-10-10 11:19:42 -04:00
|
|
|
state.GetDebugMessage().empty() ? "" : ", "+state.GetDebugMessage());
|
2019-04-02 17:03:37 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
const std::string strMessageMagic = "Bitcoin Signed Message:\n";
|