mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
fix: use std::chrono::seconds
This commit is contained in:
parent
d6fe7146ff
commit
d41d87a5be
@ -455,7 +455,7 @@ void CGovernanceManager::CheckAndRemove()
|
||||
// forget about expired requests
|
||||
auto r_it = m_requested_hash_time.begin();
|
||||
while (r_it != m_requested_hash_time.end()) {
|
||||
if (r_it->second < nNow) {
|
||||
if (r_it->second < std::chrono::seconds(nNow)) {
|
||||
m_requested_hash_time.erase(r_it++);
|
||||
} else {
|
||||
++r_it;
|
||||
@ -847,7 +847,7 @@ bool CGovernanceManager::ConfirmInventoryRequest(const CInv& inv)
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto valid_until = GetTime<std::chrono::seconds>().count() + RELIABLE_PROPAGATION_TIME;
|
||||
const auto valid_until = GetTime<std::chrono::seconds>() + std::chrono::seconds(RELIABLE_PROPAGATION_TIME);
|
||||
const auto& [_itr, inserted] = m_requested_hash_time.emplace(inv.hash, valid_until);
|
||||
|
||||
if (inserted) {
|
||||
|
@ -270,7 +270,7 @@ private:
|
||||
int nCachedBlockHeight;
|
||||
std::map<uint256, CGovernanceObject> mapPostponedObjects;
|
||||
hash_s_t setAdditionalRelayObjects;
|
||||
std::map<uint256, int64_t> m_requested_hash_time;
|
||||
std::map<uint256, std::chrono::seconds> m_requested_hash_time;
|
||||
bool fRateChecksEnabled;
|
||||
std::optional<uint256> votedFundingYesTriggerHash;
|
||||
std::map<uint256, std::shared_ptr<CSuperblock>> mapTrigger;
|
||||
|
Loading…
Reference in New Issue
Block a user