diff options
| author | Patrick Lodder <[email protected]> | 2021-08-17 21:22:56 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-17 21:22:56 +0200 |
| commit | b8a29b9f59ff4f19a53be6ac80197b42e4dbd97f (patch) | |
| tree | b115d23064dce9238d88eb3501661842bac882a6 /src/amount.cpp | |
| parent | Merge pull request #2457 from ReverseControl/1.14.4-suggested-changes-for-2297 (diff) | |
| parent | Create feelimit.py test (diff) | |
| download | discoin-b8a29b9f59ff4f19a53be6ac80197b42e4dbd97f.tar.xz discoin-b8a29b9f59ff4f19a53be6ac80197b42e4dbd97f.zip | |
Merge pull request #2441 from rnicoll/1.14.4-fees-disable-rounding
1.14.4 fees disable rounding
Diffstat (limited to 'src/amount.cpp')
| -rw-r--r-- | src/amount.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/amount.cpp b/src/amount.cpp index 176c0be85..aa6bf943e 100644 --- a/src/amount.cpp +++ b/src/amount.cpp @@ -30,6 +30,16 @@ CAmount CFeeRate::GetFee(size_t nBytes_) const nSize = nSize + 1000 - (nSize % 1000); } + return GetRelayFee(nSize); +} + +// Dogecoin: Specifically for 1.14.4 we lower accepted relay fees by removing rounding, +// in 1.14.5 we should unify the GetFee() functions again. +CAmount CFeeRate::GetRelayFee(size_t nBytes_) const +{ + assert(nBytes_ <= uint64_t(std::numeric_limits<int64_t>::max())); + int64_t nSize = int64_t(nBytes_); + CAmount nFee = nSatoshisPerK * nSize / 1000; if (nFee == 0 && nSize != 0) { |