From 07e1e77c4fb8fb06dab60ded22209f01e9132386 Mon Sep 17 00:00:00 2001 From: XMRig Date: Fri, 29 Dec 2023 21:17:19 +0700 Subject: [PATCH] Code style cleanup. --- src/base/tools/cryptonote/BlockTemplate.cpp | 15 ++++++++++----- src/base/tools/cryptonote/WalletAddress.cpp | 10 +++++----- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/base/tools/cryptonote/BlockTemplate.cpp b/src/base/tools/cryptonote/BlockTemplate.cpp index b0a6bd9d..310fedf4 100644 --- a/src/base/tools/cryptonote/BlockTemplate.cpp +++ b/src/base/tools/cryptonote/BlockTemplate.cpp @@ -1,8 +1,8 @@ /* XMRig * Copyright (c) 2012-2013 The Cryptonote developers * Copyright (c) 2014-2021 The Monero Project - * Copyright (c) 2018-2021 SChernykh - * Copyright (c) 2016-2021 XMRig , + * Copyright (c) 2018-2023 SChernykh + * Copyright (c) 2016-2023 XMRig , * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -207,8 +207,11 @@ bool xmrig::BlockTemplate::parse(bool hashes) setOffset(MINER_TX_PREFIX_OFFSET, ar.index()); ar(m_txVersion); - if (m_coin != Coin::TOWNFORGE) + + if (m_coin != Coin::TOWNFORGE) { ar(m_unlockTime); + } + ar(m_numInputs); // must be 1 input @@ -281,8 +284,9 @@ bool xmrig::BlockTemplate::parse(bool hashes) ar(m_viewTag); } - if (m_coin == Coin::TOWNFORGE) + if (m_coin == Coin::TOWNFORGE) { ar(m_unlockTime); + } ar(m_extraSize); @@ -340,8 +344,9 @@ bool xmrig::BlockTemplate::parse(bool hashes) ar(vin_rct_type); // no way I'm parsing a full game update here - if (m_coin == Coin::TOWNFORGE && m_height % 720 == 0) + if (m_coin == Coin::TOWNFORGE && m_height % 720 == 0) { return true; + } // must be RCTTypeNull (0) if (vin_rct_type != 0) { diff --git a/src/base/tools/cryptonote/WalletAddress.cpp b/src/base/tools/cryptonote/WalletAddress.cpp index 9e9a89e9..3719031a 100644 --- a/src/base/tools/cryptonote/WalletAddress.cpp +++ b/src/base/tools/cryptonote/WalletAddress.cpp @@ -1,8 +1,8 @@ /* XMRig * Copyright (c) 2012-2013 The Cryptonote developers * Copyright (c) 2014-2021 The Monero Project - * Copyright (c) 2018-2021 SChernykh - * Copyright (c) 2016-2021 XMRig , + * Copyright (c) 2018-2023 SChernykh + * Copyright (c) 2016-2023 XMRig , * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,8 +34,7 @@ bool xmrig::WalletAddress::decode(const char *address, size_t size) { uint64_t tf_tag = 0; - if (size >= 4 && !strncmp(address, "TF", 2)) - { + if (size >= 4 && !strncmp(address, "TF", 2)) { tf_tag = 0x424200; switch (address[2]) { @@ -134,8 +133,9 @@ bool xmrig::WalletAddress::decode(const char *address, size_t size) if (memcmp(m_checksum, md, sizeof(m_checksum)) == 0) { m_data = { address, size }; - if (tf_tag) + if (tf_tag) { m_tag = tf_tag; + } return true; }