aboutsummaryrefslogtreecommitdiff
path: root/src/core_io.h
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2020-11-16 16:44:50 +0000
committerpracticalswift <practicalswift@users.noreply.github.com>2021-03-02 16:05:28 +0000
commit1f05dbd06d896849d16b026bfc3315ee8b73a89f (patch)
treeeda7a641dfa820f8c7f39cada9f04f28a547f663 /src/core_io.h
parent7cc75c9ba38e516067e5a4ab84311c62ddddced7 (diff)
util: Avoid invalid integer negation in ValueFromAmount: make ValueFromAmount(const CAmount& n) well-defined also when n is std::numeric_limits<CAmount>::min()
Diffstat (limited to 'src/core_io.h')
-rw-r--r--src/core_io.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core_io.h b/src/core_io.h
index 5469a760ee..01340ae2ee 100644
--- a/src/core_io.h
+++ b/src/core_io.h
@@ -40,7 +40,7 @@ std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strN
int ParseSighashString(const UniValue& sighash);
// core_write.cpp
-UniValue ValueFromAmount(const CAmount& amount);
+UniValue ValueFromAmount(const CAmount amount);
std::string FormatScript(const CScript& script);
std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0);
std::string SighashToStr(unsigned char sighash_type);