aboutsummaryrefslogtreecommitdiff
path: root/src/amount.cpp
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2018-02-11 21:00:50 +0000
committerRoss Nicoll <[email protected]>2018-09-19 22:11:47 +0100
commit9c3a11b2488f3e01e6763bc1217598a4d1c69bde (patch)
treeed6b54c5b71a4543a32968dc5b1d391bfe59dfed /src/amount.cpp
parentInsert Dogecoin testnet merkle tree root value (#1469) (diff)
downloaddiscoin-9c3a11b2488f3e01e6763bc1217598a4d1c69bde.tar.xz
discoin-9c3a11b2488f3e01e6763bc1217598a4d1c69bde.zip
Clean up RPC tests (#1465)
* Enable full block tests * Fix invalidblocktest * Move watch only address funding to immediately before it's used, so node 0 doesn't spend the output before it checks it later. * Fix `fundrawtransaction` tests and sanitize fee calculation at the same time * Correct resolution of chain parameters when validating tx inputs, especially from previous coinbase transactions * Set block versions on full block tests so that the generated blocks are AuxPoW compatible
Diffstat (limited to 'src/amount.cpp')
-rw-r--r--src/amount.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/amount.cpp b/src/amount.cpp
index a5f6bc3cd..d6a7d8c30 100644
--- a/src/amount.cpp
+++ b/src/amount.cpp
@@ -25,6 +25,11 @@ CAmount CFeeRate::GetFee(size_t nBytes_) const
assert(nBytes_ <= uint64_t(std::numeric_limits<int64_t>::max()));
int64_t nSize = int64_t(nBytes_);
+ // Dogecoin: Round up to the nearest 1000 bytes so we get round tx fees
+ if (nSize % 1000 > 0) {
+ nSize = nSize + 1000 - (nSize % 1000);
+ }
+
CAmount nFee = nSatoshisPerK * nSize / 1000;
if (nFee == 0 && nSize != 0) {