* build: Enable C++11 build, require C++11 compiler
Implements #6211.
* depends: use c++11
* build: update ax_cxx_compile_stdcxx to serial 4
* build: force a c++ standard to be specified
Newer compilers may switch to newer standards by default. For example, gcc6
uses std=gnu++14 by default.
* c++11: fix libbdb build against libc++ in c++11 mode
atomic_init clashes with
* c++11: CAccountingEntry must be defined before use in a list
c++11ism. This fixes builds against libc++.
* PS should limit entry size, not mixing amount
* There should be no fee in mixing tx
* make sure pwalletMain is not null in PrepareDenominate
* no need for "double" in GetAverageAnonymizedRounds, "float" should be enough
* add strErrorRet
All names containing bitcoinconsensus remaned to contain dashconsensus.
This is needed to avoid conflicts with real bitcoinconsensus library
shipped with Bitcoin Core.
Signed-off-by: Oleg Girko <ol@infoserver.lv>
noexcept is default for destructors as of c++11. By throwing in reverselock's
destructor if it's lock has been tampered with, the likely result is
std::terminate being called. Indeed that happened before this change.
Once reverselock has taken another lock (its ctor didn't throw), it makes no
sense to try to grab or lock the parent lock. That is be broken/undefined
behavior depending on the parent lock's implementation, but it shouldn't cause
the reverselock to fail to re-lock when destroyed.
To avoid those problems, simply swap the parent lock's contents with a dummy
for the duration of the lock. That will ensure that any undefined behavior is
caught at the call-site rather than the reverse lock's destruction.
Barring a failed mutex unlock which would be indicative of a larger problem,
the destructor should now never throw.
* Implement BIP 9 GBT changes
- BIP9DeploymentInfo struct for static deployment info
- VersionBitsDeploymentInfo: Avoid C++11ism by commenting parameter names
- getblocktemplate: Make sure to set deployments in the version if it is LOCKED_IN
- In this commit, all rules are considered required for clients to support
* qa/rpc-tests: bip9-softforks: Add tests for getblocktemplate versionbits updates
* getblocktemplate: Explicitly handle the distinction between GBT-affecting softforks vs not
* getblocktemplate: Use version/force mutation to support pre-BIP9 clients
* Don't use floating point
Github-Pull: #8317
Rebased-From: 477777f250
* Send tip change notification from invalidateblock
This change is needed to prevent sync_blocks timeouts in the mempool_reorg
test after the sync_blocks update in the upcoming commit
"[qa] Change sync_blocks to pick smarter maxheight".
This change was initially suggested by Suhas Daftuar <sdaftuar@chaincode.com>
in https://github.com/bitcoin/bitcoin/pull/8680#r78209060
Github-Pull: #9196
Rebased-From: 67c6326abd
* torcontrol: Explicitly request RSA1024 private key
When generating a new service key, explicitly request a RSA1024 one.
The bitcoin P2P protocol has no support for the longer hidden service names
that will come with ed25519 keys, until it does, we depend on the old
hidden service type so make this explicit.
See #9214.
Github-Pull: #9234
Rebased-From: 7d3b627395
* Bugfix: FRT: don't terminate when keypool is empty
Github-Pull: #9295
Rebased-From: c24a4f5981
* add fundrawtransaction test on a locked wallet with empty keypool
Github-Pull: #9295
Rebased-From: 1a6eacbf3b
* Disable salvagewallet in GUI
salvagewallet is known to cause problems and
it's way to powerful to let it be accessible in GUI
https://github.com/bitcoin/bitcoin/issues/7463
I have few reports from different users as well,
would be a disaster for them, glad we have autobackup...
* typo
* Overhaul of coin selection for mixing
DoAutomaticDenominating logic should be:
- check pre-conditions,
- check denominations and collaterals,
- try using existing queue,
- try creating new queue.
Currently coins are selected too early and conditions are not quite right.
This is partially due to the fact that we no longer merge old inputs
and thus we are no longer able to calculate thresholds correctly using
SelectCoinsDark. To do this in a proper way we should use balances i.e.
GetAnonymizableBalance etc. Another issue is that we should take fee into
account when we calculate such balancies and when we select coins we should
ask for a correct denom, not just the smallest one as a minimum value.
And finally there are two bugs.
SelectCoinsGrouppedByAddresses: shouldn't push items smaller than
the smallest denom into resulting vector.
SelectCoinsDark: should allow small inputs in where "small" is defined
by nValueMin, not by some arbitrary amount.
* apply fee assumption for non-denoms only
* fix
* remove const
If daemon crashes, it can't save latest block sometimes, so querying daemon
for presumably best/last hash would result in a list of all txes recognized by
this wallet as its own since genesis block which could be confusing,
to say at least. Same applies for typos etc. This should fix it.
Not sure why but such weird behaviour was the case since listsinceblock rpc was
initially introduced in Bitcoin 0.5 (Oct 5, 2011)
3a6e468d9a
* Implement RequestOrphanObjects
* Ensure governance objects are only requested from peers once per call
* Add gobject log messages
* Implemented CleanOrphanObjects
* Move governance maintenance functions from NewBlock to a time-based function
* Remove unused delcaration for mapAskedForGovernanceObject