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.
Commit originated in Litecoin PR #416:
https://github.com/litecoin-project/litecoin/pull/416
Note that Dogecoin 1.21-dev has a different scrypt.h file which will
need a similar change, but scrypt is under rework, so this is the
minimal change for 1.14.5 which will get FreeBSD compilation to work
again.
recreated seeds by selecting peers across 20+ nodes that:
1. Keep up with updates, in this case run 1.14.3 or higher
2. Have NODE_NETWORK set
3. Are not known scanning clients
4. Are connectable
5. Are stable - I ordered nodes by time they have been connected to
one of my nodes
resulting set is 120 good nodes for mainnet and 20 good nodes for
testnet, serialized into chainparamsseeds.h using the contrib/
scripts.
Use CAmount rather than unsigned int for amounts for consistency
with other fee rate amounts.
This does change the type from unsigned int to unsigned int64, and
while it is unlikely anyone would need a dust limit higher than
unsigned int, again this ensures the theoretical maximum is in line
with other rates.
Fix a rare crash bug where no best chain can be activated, and therefore when trying
to find the height of the best chain via the last block triggers a null pointer dereference.
Moves the break in ActivateBestChain() when a node is being shut
down from the beginning of the loop block to the end, allowing
pindexNewTip to be populated with chainActive.Tip() rather than
its initial NULL value. Solves issues when shutting down nodes
while inside the ActivateBestChain loop.
Introduces a counter for getheader requests that have been sent to
a peer but are pending response, reducing the number of parallel
requests a node pushes out to its peers when needing to sync large
amounts of headers. All getheader requests are serialized during
initial sync, except when a non-connecting header is received,
allowing the node to resolve issues with peers sending faulty
blocks using the DoS mechanism, and when we get an inv for a block
that we do not know, because it's possible we're only connected to
legacy nodes that do not implement header announcement properly.