mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 11:32:46 +01:00
Compare commits
4 Commits
2aa17b37b5
...
6d1181ad4a
Author | SHA1 | Date | |
---|---|---|---|
|
6d1181ad4a | ||
|
ad7a373529 | ||
|
d75ee3a9e1 | ||
|
ce8b10fdd6 |
@ -86,10 +86,10 @@ likely require a reindex.
|
|||||||
- **glibc Requirement**
|
- **glibc Requirement**
|
||||||
- The minimum required glibc to run Dash Core is now **2.31**. This means that **RHEL 8** and **Ubuntu 18.04 (Bionic)** are no longer supported.
|
- The minimum required glibc to run Dash Core is now **2.31**. This means that **RHEL 8** and **Ubuntu 18.04 (Bionic)** are no longer supported.
|
||||||
|
|
||||||
## New RPCs
|
- **FreeBSD Improvements**
|
||||||
|
- Fixed issues with building Dash Core on FreeBSD.
|
||||||
|
|
||||||
- **`quorum platformsign`**
|
## New RPCs
|
||||||
- A new subcommand has been introduced, offering a structured way to perform platform-related quorum signing operations.
|
|
||||||
|
|
||||||
- **`coinjoinsalt`**
|
- **`coinjoinsalt`**
|
||||||
- Allows manipulation of a CoinJoin salt stored in a wallet.
|
- Allows manipulation of a CoinJoin salt stored in a wallet.
|
||||||
@ -153,7 +153,7 @@ likely require a reindex.
|
|||||||
## Devnet Breaking Changes
|
## Devnet Breaking Changes
|
||||||
|
|
||||||
- **Hardfork Activation Changes**
|
- **Hardfork Activation Changes**
|
||||||
- `BRR` (`realloc`), `DIP0020`, `DIP0024`, `V19`, `V20`, and `MN_R` hardforks are now activated at **block 2** instead of block **300** on devnets.
|
- `BRR` (`realloc`), `DIP0020`, `DIP0024`, `V19`, `V20`, and `MN_RR` hardforks are now activated at **block 2** instead of block **300** on devnets.
|
||||||
- **Implications:**
|
- **Implications:**
|
||||||
- Breaking change.
|
- Breaking change.
|
||||||
- Inability to sync on devnets created with earlier Dash Core versions and vice versa.
|
- Inability to sync on devnets created with earlier Dash Core versions and vice versa.
|
||||||
|
@ -235,7 +235,7 @@ Remote Procedure Calls (RPCs)
|
|||||||
support for coin selection and a custom fee rate. The `send` RPC is experimental
|
support for coin selection and a custom fee rate. The `send` RPC is experimental
|
||||||
and may change in subsequent releases. Using it is encouraged once it's no
|
and may change in subsequent releases. Using it is encouraged once it's no
|
||||||
longer experimental: `sendmany` and `sendtoaddress` may be deprecated in a future release.
|
longer experimental: `sendmany` and `sendtoaddress` may be deprecated in a future release.
|
||||||
- A new `quorum signplatform` RPC is added for Platform needs. This composite command limits Platform to only request signatures from the Platform quorum type. It is equivalent to `quorum sign <platform type>`.
|
- A new `quorum platformsign` RPC is added for Platform needs. This composite command limits Platform to only request signatures from the Platform quorum type. It is equivalent to `quorum sign <platform type>`.
|
||||||
|
|
||||||
### RPC changes
|
### RPC changes
|
||||||
- `createwallet` has an updated argument list: `createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup )`
|
- `createwallet` has an updated argument list: `createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup )`
|
||||||
|
23
src/sync.h
23
src/sync.h
@ -161,18 +161,31 @@ template <typename Mutex, typename Base = typename Mutex::UniqueLock>
|
|||||||
class SCOPED_LOCKABLE UniqueLock : public Base
|
class SCOPED_LOCKABLE UniqueLock : public Base
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
#ifdef DEBUG_LOCKCONTENTION
|
||||||
|
std::string m_lock_log_time_prefix;
|
||||||
|
std::chrono::microseconds m_started_time{};
|
||||||
|
#endif
|
||||||
void Enter(const char* pszName, const char* pszFile, int nLine)
|
void Enter(const char* pszName, const char* pszFile, int nLine)
|
||||||
{
|
{
|
||||||
EnterCritical(pszName, pszFile, nLine, Base::mutex());
|
EnterCritical(pszName, pszFile, nLine, Base::mutex());
|
||||||
#ifdef DEBUG_LOCKCONTENTION
|
#ifdef DEBUG_LOCKCONTENTION
|
||||||
|
m_lock_log_time_prefix = strprintf("lock contention %s, %s:%d", pszName, pszFile, nLine);
|
||||||
|
m_started_time = GetTime<std::chrono::microseconds>();
|
||||||
if (Base::try_lock()) return;
|
if (Base::try_lock()) return;
|
||||||
LOG_TIME_MICROS_WITH_CATEGORY(strprintf("lock contention %s, %s:%d", pszName, pszFile, nLine), BCLog::LOCK);
|
LOG_TIME_MICROS_WITH_CATEGORY(m_lock_log_time_prefix, BCLog::LOCK);
|
||||||
#endif
|
#endif
|
||||||
Base::lock();
|
Base::lock();
|
||||||
|
#ifdef DEBUG_LOCKCONTENTION
|
||||||
|
m_started_time = GetTime<std::chrono::microseconds>();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TryEnter(const char* pszName, const char* pszFile, int nLine)
|
bool TryEnter(const char* pszName, const char* pszFile, int nLine)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG_LOCKCONTENTION
|
||||||
|
m_lock_log_time_prefix = strprintf("lock contention %s, %s:%d", pszName, pszFile, nLine);
|
||||||
|
m_started_time = GetTime<std::chrono::microseconds>();
|
||||||
|
#endif
|
||||||
EnterCritical(pszName, pszFile, nLine, Base::mutex(), true);
|
EnterCritical(pszName, pszFile, nLine, Base::mutex(), true);
|
||||||
if (Base::try_lock()) {
|
if (Base::try_lock()) {
|
||||||
return true;
|
return true;
|
||||||
@ -203,8 +216,16 @@ public:
|
|||||||
|
|
||||||
~UniqueLock() UNLOCK_FUNCTION()
|
~UniqueLock() UNLOCK_FUNCTION()
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG_LOCKCONTENTION
|
||||||
|
const auto diff_time = (GetTime<std::chrono::microseconds>() - m_started_time);
|
||||||
|
#endif
|
||||||
if (Base::owns_lock())
|
if (Base::owns_lock())
|
||||||
LeaveCritical();
|
LeaveCritical();
|
||||||
|
#ifdef DEBUG_LOCKCONTENTION
|
||||||
|
if (diff_time.count() > 100 && m_started_time.count() > 0) {
|
||||||
|
LogPrint(BCLog::LOCK, "%s inside %iμs\n", m_lock_log_time_prefix, diff_time.count());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
operator bool()
|
operator bool()
|
||||||
|
Loading…
Reference in New Issue
Block a user