aboutsummaryrefslogtreecommitdiff
path: root/src/core_io.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-08-07 14:38:39 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-08-07 17:01:21 +0200
commit46347add438d49a69f34a3f2ab755feda7daff10 (patch)
tree24025b570a23124335f6ce839a797bfc291102f7 /src/core_io.h
parentdac37823d4799477b19434d4d53c74c4af455c76 (diff)
rpc: Move ValueFromAmount to core_write
This is necessary because core_write has to write amounts in TxToUniv, and mistakingly uses FormatMoney for that (which is only for debugging). We don't move AmountFromValue at the same time, as this is more challenging due to the RPCError depencency there.
Diffstat (limited to 'src/core_io.h')
-rw-r--r--src/core_io.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core_io.h b/src/core_io.h
index 2d63be5fc4..3f25faf0ec 100644
--- a/src/core_io.h
+++ b/src/core_io.h
@@ -5,6 +5,8 @@
#ifndef BITCOIN_CORE_IO_H
#define BITCOIN_CORE_IO_H
+#include "amount.h"
+
#include <string>
#include <vector>
@@ -25,6 +27,7 @@ uint256 ParseHashStr(const std::string&, const std::string& strName);
std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
// core_write.cpp
+UniValue ValueFromAmount(const CAmount& amount);
std::string FormatScript(const CScript& script);
std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0);
void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex);