Skip to content

Commit 2e60be9

Browse files
fix: use uint32_t() syntax for type conversions to resolve build errors
1 parent 2e14f9f commit 2e60be9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/llmq/chainlocks.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,16 +401,16 @@ void CChainLocksHandler::BlockConnected(const std::shared_ptr<const CBlock>& pbl
401401
return;
402402
}
403403

404-
if (uint32_t{clsig_height} > WITH_LOCK(cs, return bestChainLock.getHeight())) {
404+
if (clsig_height > WITH_LOCK(cs, return bestChainLock.getHeight())) {
405405
// Get the ancestor block for the chainlock
406-
const CBlockIndex* pindexAncestor = pindex->GetAncestor(uint32_t{clsig_height});
406+
const CBlockIndex* pindexAncestor = pindex->GetAncestor(uint32_t(clsig_height));
407407
if (!pindexAncestor) {
408408
LogPrint(BCLog::CHAINLOCKS, "CChainLocksHandler::%s -- Cannot find ancestor block at height %d for chainlock\n",
409409
__func__, clsig_height);
410410
return;
411411
}
412412

413-
auto clsig = CChainLockSig(uint32_t{clsig_height}, pindexAncestor->GetBlockHash(), coinbase_cl.signature);
413+
auto clsig = CChainLockSig(uint32_t(clsig_height), pindexAncestor->GetBlockHash(), coinbase_cl.signature);
414414
auto result = ProcessNewChainLock(-1, clsig, ::SerializeHash(clsig));
415415
if (result.m_error.has_value()) {
416416
LogPrint(BCLog::CHAINLOCKS, "CChainLocksHandler::%s -- Failed to process chainlock from coinbase: %s\n",

0 commit comments

Comments
 (0)