Commit graph

17 commits

Author SHA1 Message Date
Dan Raviv 6efc333ffe
Remove redundant explicitly defined copy ctors
CFeeRate and CTxMemPoolEntry have explicitly defined copy ctors which has
the same functionality as the implicit default copy ctors which would
have been generated otherwise.

Besides being redundant, it violates the rule of three
(see https://en.wikipedia.org/wiki/Rule_of_three_(C%2B%2B_programming) ).
(Of course, the rule of three doesn't -really- cause a resource
management issue here, but the reason for that is exactly that there is
no need for an explicit copy ctor in the first place since no resources
are being managed).

CFeeRate has an explicitly defined copy ctor which has the same
functionality as the implicit default copy ctor which would have been
generated otherwise.

-----------------------------

Cherry-picked from: b426e2467

Note:
Solved conflict where upstream moved CFeeRate into ./policy/
whereas we still have it in amount.h/cpp on 1.14.
2021-08-28 21:07:58 +02:00
Ross Nicoll ce6e3d8137 Remove relay-only rounding
Remove rounding of transaction sizes when calculating fee minimums for relaying,
to simplify fee logic.
2021-08-17 08:50:42 +01:00
Ross Nicoll 1be681a1b9 Modify chain consensus parameters to be height aware (#1396)
* Modify chain consensus parameters to be height aware
* Correct implementation of simplified rewards in parameters
* Correct max money
* Use base block version in IsSuperMajority() instead of full version
* Correct mining of blocks in AuxPoW tests
* Add in missing pre-AuxPoW consensus checks
2018-09-19 19:24:06 +01:00
Ross Nicoll 64af132fdb Replace consensus values with Dogecoin equivalents
* Replace chain parameters with Dogecoin values
* Update maximum coins to match Dogecoin
* Disable version 2 block requirement
* Update coinbase maturity to match Dogecoin
2018-09-19 19:21:48 +01:00
isle2983 27765b6403 Increment MIT Licence copyright header year on files modified in 2016
Edited via:

$ contrib/devtools/copyright_header.py update .
2016-12-31 11:01:21 -07:00
Pieter Wuille 528472111b Get rid of nType and nVersion
Remove the nType and nVersion as parameters to all serialization methods
and functions. There is only one place where it's read and has an impact
(in CAddress), and even there it does not impact any of the recursively
invoked serializers.

Instead, the few places that need nType or nVersion are changed to read
it directly from the stream object, through GetType() and GetVersion()
methods which are added to all stream classes.
2016-11-07 13:56:27 -08:00
MarcoFalke fa2da2cb60 [amount] Add support for negative fee rates
Currently negative fee rates are not supported on archs of 64-bit or
more
2016-04-08 19:59:53 +02:00
MarcoFalke faf756ae4e [amount] Make GetFee() monotonic
This reverts the hard-to-read and buggy code introduced in
d88af56011 and adds documentation
2016-03-17 17:00:45 +01:00
MarcoFalke fa24439ff3 Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
paveljanik 8a03727d9c Fix various typos 2015-12-02 15:18:22 +01:00
Matt Corallo 241d6078ba Add CFeeRate += operator 2015-10-13 01:04:39 -07:00
Ross Nicoll 9ca7857df7 Rationalize currency unit to "BTC"
Previously various user-facing strings have used inconsistent currency units "BTC",
"btc" and "bitcoins". This adds a single constant and uses it for each reference to
the currency unit.

Also adds a description of the unit for --maxtxfee, and adds the missing "amount"
field description to the (deprecated) move RPC command.
2015-08-03 22:58:30 +01:00
Peter Todd 0bb43854c7
Improve comment explaining purpose of MAX_MONEY constant 2015-05-27 21:02:04 -04:00
sandakersmann f914f1a746
Added "Core" to copyright headers
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19 19:55:32 +01:00
jtimon eda3733091 MOVEONLY: Move CFeeRate and Amount constants to amount.o 2014-10-27 13:54:37 +01:00
Philip Kaufmann e2efdf3937 amount.h: update license, add header end comment + rem from util.h 2014-10-02 11:25:21 +02:00
Mark Friedenbach a372168e77 Use a typedef for monetary values 2014-09-26 15:42:04 -07:00