Skip to content

Commit 710c504

Browse files
committed
refactor: s/cs_inputReqests/cs_input_requests/g
1 parent 31065d1 commit 710c504

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/instantsend/signing.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void InstantSendSigner::Stop()
6060

6161
void InstantSendSigner::ClearInputsFromQueue(const std::unordered_set<uint256, StaticSaltedHasher>& ids)
6262
{
63-
LOCK(cs_inputReqests);
63+
LOCK(cs_input_requests);
6464
for (const auto& id : ids) {
6565
inputRequestIds.erase(id);
6666
}
@@ -84,7 +84,7 @@ MessageProcessingResult InstantSendSigner::HandleNewRecoveredSig(const llmq::CRe
8484
}
8585

8686
uint256 txid;
87-
if (LOCK(cs_inputReqests); inputRequestIds.count(recoveredSig.getId())) {
87+
if (LOCK(cs_input_requests); inputRequestIds.count(recoveredSig.getId())) {
8888
txid = recoveredSig.getMsgHash();
8989
}
9090
if (!txid.IsNull()) {
@@ -331,7 +331,7 @@ bool InstantSendSigner::TrySignInputLocks(const CTransaction& tx, bool fRetroact
331331
for (const auto i : irange::range(tx.vin.size())) {
332332
const auto& in = tx.vin[i];
333333
auto& id = ids[i];
334-
WITH_LOCK(cs_inputReqests, inputRequestIds.emplace(id));
334+
WITH_LOCK(cs_input_requests, inputRequestIds.emplace(id));
335335
LogPrint(BCLog::INSTANTSEND, "%s -- txid=%s: trying to vote on input %s with id %s. fRetroactive=%d\n",
336336
__func__, tx.GetHash().ToString(), in.prevout.ToStringShort(), id.ToString(), fRetroactive);
337337
if (m_sigman.AsyncSignIfMember(llmqType, m_shareman, id, tx.GetHash(), {}, fRetroactive)) {

src/instantsend/signing.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ class InstantSendSigner : public llmq::CRecoveredSigsListener
3939
const CMasternodeSync& m_mn_sync;
4040

4141
private:
42-
mutable Mutex cs_inputReqests;
42+
mutable Mutex cs_input_requests;
4343
mutable Mutex cs_creating;
4444

4545
/**
4646
* Request ids of inputs that we signed. Used to determine if a recovered signature belongs to an
4747
* in-progress input lock.
4848
*/
49-
std::unordered_set<uint256, StaticSaltedHasher> inputRequestIds GUARDED_BY(cs_inputReqests);
49+
std::unordered_set<uint256, StaticSaltedHasher> inputRequestIds GUARDED_BY(cs_input_requests);
5050

5151
/**
5252
* These are the islocks that are currently in the middle of being created. Entries are created when we observed
@@ -68,18 +68,18 @@ class InstantSendSigner : public llmq::CRecoveredSigsListener
6868
void Stop();
6969

7070
void ClearInputsFromQueue(const std::unordered_set<uint256, StaticSaltedHasher>& ids)
71-
EXCLUSIVE_LOCKS_REQUIRED(!cs_inputReqests);
71+
EXCLUSIVE_LOCKS_REQUIRED(!cs_input_requests);
7272

7373
void ClearLockFromQueue(const InstantSendLockPtr& islock)
7474
EXCLUSIVE_LOCKS_REQUIRED(!cs_creating);
7575

7676
[[nodiscard]] MessageProcessingResult HandleNewRecoveredSig(const llmq::CRecoveredSig& recoveredSig) override
77-
EXCLUSIVE_LOCKS_REQUIRED(!cs_creating, !cs_inputReqests);
77+
EXCLUSIVE_LOCKS_REQUIRED(!cs_creating, !cs_input_requests);
7878

7979
void ProcessPendingRetryLockTxs(const std::vector<CTransactionRef>& retryTxs)
80-
EXCLUSIVE_LOCKS_REQUIRED(!cs_creating, !cs_inputReqests);
80+
EXCLUSIVE_LOCKS_REQUIRED(!cs_creating, !cs_input_requests);
8181
void ProcessTx(const CTransaction& tx, bool fRetroactive, const Consensus::Params& params)
82-
EXCLUSIVE_LOCKS_REQUIRED(!cs_creating, !cs_inputReqests);
82+
EXCLUSIVE_LOCKS_REQUIRED(!cs_creating, !cs_input_requests);
8383

8484
private:
8585
[[nodiscard]] bool CheckCanLock(const CTransaction& tx, bool printDebug, const Consensus::Params& params) const;
@@ -95,7 +95,7 @@ class InstantSendSigner : public llmq::CRecoveredSigsListener
9595

9696
[[nodiscard]] bool TrySignInputLocks(const CTransaction& tx, bool allowResigning, Consensus::LLMQType llmqType,
9797
const Consensus::Params& params)
98-
EXCLUSIVE_LOCKS_REQUIRED(!cs_inputReqests);
98+
EXCLUSIVE_LOCKS_REQUIRED(!cs_input_requests);
9999
void TrySignInstantSendLock(const CTransaction& tx)
100100
EXCLUSIVE_LOCKS_REQUIRED(!cs_creating);
101101
};

0 commit comments

Comments
 (0)