mirror of
https://github.com/cculianu/Fulcrum.git
synced 2026-08-18 13:09:12 +02:00
We will need this in the future to verify tx's and compose tx's The Tx class is pretty usable as-is.. just manipulates a byte stream.
20 lines
579 B
C++
20 lines
579 B
C++
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
|
// Copyright (c) 2009-2016 The Bitcoin Core developers
|
|
// Copyright (c) 2017-2018 The Bitcoin developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#include "amount.h"
|
|
|
|
#include "tinyformat.h"
|
|
|
|
namespace bitcoin {
|
|
|
|
const std::string CURRENCY_UNIT = "BCH";
|
|
|
|
std::string Amount::ToString() const {
|
|
return strprintf("%d.%08d %s", *this / COIN, (*this % COIN) / SATOSHI,
|
|
CURRENCY_UNIT);
|
|
}
|
|
|
|
} // end namespace bitcoin
|