mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user