diff --git a/doc/release-notes.md b/doc/release-notes.md index fac2f59ee..9c1c57940 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,5 +1,6 @@ Bitcoin ABC version 0.19.9 is now available from: This release includes the following features and fixes: + - Return amounts from `decoderawtransaction` are padded to 8 decimal places. diff --git a/src/core_io.h b/src/core_io.h index 38dedca9c..732538a53 100644 --- a/src/core_io.h +++ b/src/core_io.h @@ -1,36 +1,38 @@ // Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CORE_IO_H #define BITCOIN_CORE_IO_H #include #include +class Amount; class CBlock; class CMutableTransaction; class CScript; class CTransaction; class uint256; class UniValue; // core_read.cpp CScript ParseScript(const std::string &s); std::string ScriptToAsmStr(const CScript &script, const bool fAttemptSighashDecode = false); bool DecodeHexTx(CMutableTransaction &tx, const std::string &strHexTx); bool DecodeHexBlk(CBlock &, const std::string &strHexBlk); uint256 ParseHashUV(const UniValue &v, const std::string &strName); uint256 ParseHashStr(const std::string &, const std::string &strName); std::vector ParseHexUV(const UniValue &v, const std::string &strName); // core_write.cpp +UniValue ValueFromAmount(const Amount &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); void TxToUniv(const CTransaction &tx, const uint256 &hashBlock, UniValue &entry, bool include_hex = true, int serialize_flags = 0); #endif // BITCOIN_CORE_IO_H diff --git a/src/core_write.cpp b/src/core_write.cpp index a68ddf899..c4a1235a9 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -1,246 +1,254 @@ // Copyright (c) 2009-2016 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 #include #include #include