From c49e50617687f7f4c4fd03caa57807756a9086b0 Mon Sep 17 00:00:00 2001 From: pasta Date: Tue, 28 Jul 2020 20:23:12 -0500 Subject: [PATCH] scripted-diff: Merge #13753: Remove trailing whitespaces -BEGIN VERIFY SCRIPT- sed --in-place'' --regexp-extended 's/[[:space:]]+$//g' $(git grep -I --files-with-matches --extended-regexp '[[:space:]]+$' -- src test ':!*.svg' ':!src/crypto/sha256_sse4*' ':!src/leveldb' ':!src/qt/locale' ':!src/secp256k1' ':!src/univalue') -END VERIFY SCRIPT- Signed-off-by: pasta --- src/addrman.cpp | 2 +- src/addrman.h | 2 +- src/bloom.cpp | 2 +- src/bloom.h | 4 +- src/checkqueue.h | 4 +- src/clientversion.cpp | 4 +- src/coins.h | 4 +- src/consensus/tx_verify.h | 2 +- src/crypto/aes_helper.c | 6 +- src/crypto/cubehash.c | 6 +- src/crypto/echo.c | 6 +- src/crypto/groestl.c | 6 +- src/crypto/jh.c | 6 +- src/crypto/keccak.c | 8 +- src/crypto/luffa.c | 6 +- src/crypto/shavite.c | 8 +- src/crypto/simd.c | 6 +- src/crypto/skein.c | 6 +- src/crypto/sph_blake.h | 6 +- src/crypto/sph_bmw.h | 6 +- src/crypto/sph_cubehash.h | 6 +- src/crypto/sph_echo.h | 8 +- src/crypto/sph_groestl.h | 6 +- src/crypto/sph_jh.h | 6 +- src/crypto/sph_keccak.h | 6 +- src/crypto/sph_luffa.h | 10 +- src/crypto/sph_shavite.h | 12 +-- src/crypto/sph_simd.h | 6 +- src/crypto/sph_skein.h | 6 +- src/crypto/sph_types.h | 6 +- src/ctpl.h | 2 +- src/flat-database.h | 2 +- src/governance/governance.cpp | 4 +- src/httprpc.cpp | 2 +- src/immer/detail/arrays/no_capacity.hpp | 2 +- src/immer/detail/type_traits.hpp | 6 +- src/qt/bitcoingui.h | 2 +- src/qt/guiutil.h | 4 +- src/qt/macnotificationhandler.mm | 2 +- src/qt/modaloverlay.cpp | 2 +- src/qt/optionsdialog.h | 2 +- src/qt/optionsmodel.cpp | 2 +- src/qt/qvalidatedlineedit.h | 2 +- src/qt/sendcoinsentry.cpp | 2 +- src/qt/trafficgraphwidget.cpp | 2 +- src/reverse_iterator.h | 10 +- src/rpc/governance.cpp | 2 +- src/script/interpreter.cpp | 6 +- src/serialize.h | 10 +- src/streams.h | 2 +- src/test/README.md | 10 +- src/test/data/base58_keys_invalid.json | 98 ++++++++++---------- src/test/data/script_tests.json | 2 +- src/test/dbwrapper_tests.cpp | 12 +-- src/test/governance_validators_tests.cpp | 2 +- src/test/limitedmap_tests.cpp | 4 +- src/test/mempool_tests.cpp | 2 +- src/test/net_tests.cpp | 2 +- src/test/prevector_tests.cpp | 2 +- src/test/raii_event_tests.cpp | 8 +- src/test/script_tests.cpp | 2 +- src/test/serialize_tests.cpp | 4 +- src/test/streams_tests.cpp | 20 ++-- src/timedata.h | 2 +- src/txdb.cpp | 2 +- src/txmempool.cpp | 2 +- src/txmempool.h | 2 +- src/validation.h | 4 +- test/README.md | 4 +- test/functional/feature_bip68_sequence.py | 2 +- test/functional/feature_maxuploadtarget.py | 2 +- test/functional/feature_multikeysporks.py | 4 +- test/functional/feature_proxy.py | 6 +- test/functional/test_framework/blocktools.py | 2 +- test/functional/wallet_txn_clone.py | 6 +- 75 files changed, 223 insertions(+), 223 deletions(-) diff --git a/src/addrman.cpp b/src/addrman.cpp index 705cc1a08d..ac37931dde 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -371,7 +371,7 @@ CAddrInfo CAddrMan::Select_(bool newOnly) // Use a 50% chance for choosing between tried and new table entries. if (!newOnly && - (nTried > 0 && (nNew == 0 || RandomInt(2) == 0))) { + (nTried > 0 && (nNew == 0 || RandomInt(2) == 0))) { // use a tried node double fChanceFactor = 1.0; while (1) { diff --git a/src/addrman.h b/src/addrman.h index d9615d6ca9..e41d998313 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -183,7 +183,7 @@ public: #define ADDRMAN_SET_TRIED_COLLISION_SIZE 10 /** - * Stochastical (IP) address manager + * Stochastical (IP) address manager */ class CAddrMan { diff --git a/src/bloom.cpp b/src/bloom.cpp index 545c75cb93..fbf0313388 100644 --- a/src/bloom.cpp +++ b/src/bloom.cpp @@ -251,7 +251,7 @@ bool CBloomFilter::IsRelevantAndUpdate(const CTransaction& tx) const CTxOut& txout = tx.vout[i]; // Match if the filter contains any arbitrary script data element in any scriptPubKey in tx // If this matches, also add the specific output that was matched. - // This means clients don't have to update the filter themselves when a new relevant tx + // This means clients don't have to update the filter themselves when a new relevant tx // is discovered in order to find spending transactions, which avoids round-tripping and race conditions. if(CheckScript(txout.scriptPubKey)) { fFound = true; diff --git a/src/bloom.h b/src/bloom.h index e82b593c0d..33c7d7227a 100644 --- a/src/bloom.h +++ b/src/bloom.h @@ -35,9 +35,9 @@ enum bloomflags /** * BloomFilter is a probabilistic filter which SPV clients provide * so that we can filter the transactions we send them. - * + * * This allows for significantly more efficient transaction and block downloads. - * + * * Because bloom filters are probabilistic, a SPV node can increase the false- * positive rate, making us send it transactions which aren't actually its, * allowing clients to trade more bandwidth for more privacy by obfuscating which diff --git a/src/checkqueue.h b/src/checkqueue.h index 657912ff6a..1061796bc3 100644 --- a/src/checkqueue.h +++ b/src/checkqueue.h @@ -16,7 +16,7 @@ template class CCheckQueueControl; -/** +/** * Queue for verifications that have to be performed. * The verifications are represented by a type T, which must provide an * operator(), returning a bool. @@ -163,7 +163,7 @@ public: }; -/** +/** * RAII-style controller object for a CCheckQueue that guarantees the passed * queue is finished before continuing. */ diff --git a/src/clientversion.cpp b/src/clientversion.cpp index 7d4eaf5693..3dd174980b 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -81,8 +81,8 @@ std::string FormatFullVersion() return CLIENT_BUILD; } -/** - * Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki) +/** + * Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki) */ std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments) { diff --git a/src/coins.h b/src/coins.h index 45ff73b452..1885d6ae7a 100644 --- a/src/coins.h +++ b/src/coins.h @@ -203,7 +203,7 @@ class CCoinsViewCache : public CCoinsViewBacked protected: /** * Make mutable so that we can "fill the cache" even from Get-methods - * declared as "const". + * declared as "const". */ mutable uint256 hashBlock; mutable CCoinsMap cacheCoins; @@ -280,7 +280,7 @@ public: //! Calculate the size of the cache (in bytes) size_t DynamicMemoryUsage() const; - /** + /** * Amount of dash coming in to a transaction * Note that lightweight clients may not know anything besides the hash of previous transactions, * so may not be able to calculate this. diff --git a/src/consensus/tx_verify.h b/src/consensus/tx_verify.h index 49f33a10bd..720491d8d0 100644 --- a/src/consensus/tx_verify.h +++ b/src/consensus/tx_verify.h @@ -41,7 +41,7 @@ unsigned int GetLegacySigOpCount(const CTransaction& tx); /** * Count ECDSA signature operations in pay-to-script-hash inputs. - * + * * @param[in] mapInputs Map of previous transactions that have outputs we're spending * @return maximum number of sigops required to validate this transaction's inputs * @see CTransaction::FetchInputs diff --git a/src/crypto/aes_helper.c b/src/crypto/aes_helper.c index 75b7cc69d0..7a33a491b8 100644 --- a/src/crypto/aes_helper.c +++ b/src/crypto/aes_helper.c @@ -18,7 +18,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -26,10 +26,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/cubehash.c b/src/crypto/cubehash.c index 9322fe14e0..9e71cf388c 100644 --- a/src/crypto/cubehash.c +++ b/src/crypto/cubehash.c @@ -5,7 +5,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -13,10 +13,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/echo.c b/src/crypto/echo.c index 667e3f357a..3adf47f452 100644 --- a/src/crypto/echo.c +++ b/src/crypto/echo.c @@ -5,7 +5,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -13,10 +13,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/groestl.c b/src/crypto/groestl.c index 928bc41efa..4bc792b72a 100644 --- a/src/crypto/groestl.c +++ b/src/crypto/groestl.c @@ -5,7 +5,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -13,10 +13,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/jh.c b/src/crypto/jh.c index 41487a5306..11fbff2e4c 100644 --- a/src/crypto/jh.c +++ b/src/crypto/jh.c @@ -5,7 +5,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -13,10 +13,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/keccak.c b/src/crypto/keccak.c index cff9f87dae..f9cebadfd2 100644 --- a/src/crypto/keccak.c +++ b/src/crypto/keccak.c @@ -5,7 +5,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -13,10 +13,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -46,7 +46,7 @@ extern "C"{ * SPH_KECCAK_UNROLL number of loops to unroll (0/undef for full unroll) * SPH_KECCAK_INTERLEAVE use bit-interleaving (32-bit type only) * SPH_KECCAK_NOCOPY do not copy the state into local variables - * + * * If there is no usable 64-bit type, the code automatically switches * back to the 32-bit implementation. * diff --git a/src/crypto/luffa.c b/src/crypto/luffa.c index a761bea0ad..471651157f 100644 --- a/src/crypto/luffa.c +++ b/src/crypto/luffa.c @@ -5,7 +5,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -13,10 +13,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/shavite.c b/src/crypto/shavite.c index 85074f3340..efa1e46045 100644 --- a/src/crypto/shavite.c +++ b/src/crypto/shavite.c @@ -5,7 +5,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -13,10 +13,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -99,7 +99,7 @@ static const sph_u32 IV512[] = { /* * This is the code needed to match the "reference implementation" as * published on Nov 23rd, 2009, instead of the published specification. - * + * #define AES_BIG_ENDIAN 1 #include "aes_helper.c" diff --git a/src/crypto/simd.c b/src/crypto/simd.c index 2c80626173..f7fb8a7193 100644 --- a/src/crypto/simd.c +++ b/src/crypto/simd.c @@ -5,7 +5,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -13,10 +13,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/skein.c b/src/crypto/skein.c index 7e47e35221..949079f38b 100644 --- a/src/crypto/skein.c +++ b/src/crypto/skein.c @@ -5,7 +5,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -13,10 +13,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/sph_blake.h b/src/crypto/sph_blake.h index 386642df77..0957417cf4 100644 --- a/src/crypto/sph_blake.h +++ b/src/crypto/sph_blake.h @@ -8,7 +8,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -16,10 +16,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/sph_bmw.h b/src/crypto/sph_bmw.h index 8941cd5c91..f958f77199 100644 --- a/src/crypto/sph_bmw.h +++ b/src/crypto/sph_bmw.h @@ -7,7 +7,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -15,10 +15,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/sph_cubehash.h b/src/crypto/sph_cubehash.h index 10d87a9275..5480052d6c 100644 --- a/src/crypto/sph_cubehash.h +++ b/src/crypto/sph_cubehash.h @@ -8,7 +8,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -16,10 +16,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/sph_echo.h b/src/crypto/sph_echo.h index 41975b0058..f298c495f4 100644 --- a/src/crypto/sph_echo.h +++ b/src/crypto/sph_echo.h @@ -7,7 +7,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -15,10 +15,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -312,7 +312,7 @@ void sph_echo512_close(void *cc, void *dst); */ void sph_echo512_addbits_and_close( void *cc, unsigned ub, unsigned n, void *dst); - + #ifdef __cplusplus } #endif diff --git a/src/crypto/sph_groestl.h b/src/crypto/sph_groestl.h index 78afda8fbc..21948cee92 100644 --- a/src/crypto/sph_groestl.h +++ b/src/crypto/sph_groestl.h @@ -6,7 +6,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -14,10 +14,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/sph_jh.h b/src/crypto/sph_jh.h index 5ce37c6fde..f8812b448f 100644 --- a/src/crypto/sph_jh.h +++ b/src/crypto/sph_jh.h @@ -7,7 +7,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -15,10 +15,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/sph_keccak.h b/src/crypto/sph_keccak.h index 716f18c6b9..1f37a79c21 100644 --- a/src/crypto/sph_keccak.h +++ b/src/crypto/sph_keccak.h @@ -7,7 +7,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -15,10 +15,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/sph_luffa.h b/src/crypto/sph_luffa.h index 6738ccb40d..5132477482 100644 --- a/src/crypto/sph_luffa.h +++ b/src/crypto/sph_luffa.h @@ -7,7 +7,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -15,10 +15,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -288,9 +288,9 @@ void sph_luffa512_close(void *cc, void *dst); */ void sph_luffa512_addbits_and_close( void *cc, unsigned ub, unsigned n, void *dst); - + #ifdef __cplusplus } #endif - + #endif diff --git a/src/crypto/sph_shavite.h b/src/crypto/sph_shavite.h index 58d3489a15..9a76f971cc 100644 --- a/src/crypto/sph_shavite.h +++ b/src/crypto/sph_shavite.h @@ -9,7 +9,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -17,10 +17,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -306,9 +306,9 @@ void sph_shavite512_close(void *cc, void *dst); */ void sph_shavite512_addbits_and_close( void *cc, unsigned ub, unsigned n, void *dst); - + #ifdef __cplusplus } -#endif - +#endif + #endif diff --git a/src/crypto/sph_simd.h b/src/crypto/sph_simd.h index 6f6f8d7bb5..27e106b03c 100644 --- a/src/crypto/sph_simd.h +++ b/src/crypto/sph_simd.h @@ -7,7 +7,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -15,10 +15,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/sph_skein.h b/src/crypto/sph_skein.h index 29ff1cabe3..d159a9d5c0 100644 --- a/src/crypto/sph_skein.h +++ b/src/crypto/sph_skein.h @@ -12,7 +12,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -20,10 +20,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/crypto/sph_types.h b/src/crypto/sph_types.h index 7295b0b370..e74e4da848 100644 --- a/src/crypto/sph_types.h +++ b/src/crypto/sph_types.h @@ -18,7 +18,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -26,10 +26,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/ctpl.h b/src/ctpl.h index 64f650d3e8..07c9a00be1 100644 --- a/src/ctpl.h +++ b/src/ctpl.h @@ -107,7 +107,7 @@ namespace ctpl { std::function * _f = nullptr; this->q.pop(_f); std::unique_ptr> func(_f); // at return, delete the function even if an exception occurred - + std::function f; if (_f) f = *_f; diff --git a/src/flat-database.h b/src/flat-database.h index 5b6db21356..ffc0b61559 100644 --- a/src/flat-database.h +++ b/src/flat-database.h @@ -12,7 +12,7 @@ #include #include -/** +/** * Generic Dumping and Loading * --------------------------- */ diff --git a/src/governance/governance.cpp b/src/governance/governance.cpp index 03ecc12ef0..2e0eed93f7 100644 --- a/src/governance/governance.cpp +++ b/src/governance/governance.cpp @@ -573,14 +573,14 @@ bool CGovernanceManager::ConfirmInventoryRequest(const CInv& inv) return false; } break; - } + } case MSG_GOVERNANCE_OBJECT_VOTE: { if (cmapVoteToObject.HasKey(inv.hash)) { LogPrint(BCLog::GOBJECT, "CGovernanceManager::ConfirmInventoryRequest already have governance vote, returning false\n"); return false; } break; - } + } default: LogPrint(BCLog::GOBJECT, "CGovernanceManager::ConfirmInventoryRequest unknown type, returning false\n"); return false; diff --git a/src/httprpc.cpp b/src/httprpc.cpp index 9ad0adee85..106df8de85 100644 --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -86,7 +86,7 @@ static void JSONErrorReply(HTTPRequest* req, const UniValue& objError, const Uni //This function checks username and password against -rpcauth //entries from config file. static bool multiUserAuthorized(std::string strUserPass) -{ +{ if (strUserPass.find(':') == std::string::npos) { return false; } diff --git a/src/immer/detail/arrays/no_capacity.hpp b/src/immer/detail/arrays/no_capacity.hpp index 33135d0cc3..3a39b12cbd 100644 --- a/src/immer/detail/arrays/no_capacity.hpp +++ b/src/immer/detail/arrays/no_capacity.hpp @@ -93,7 +93,7 @@ struct no_capacity template + && compatible_sentinel_v, bool> = true> static no_capacity from_range(Iter first, Sent last) { diff --git a/src/immer/detail/type_traits.hpp b/src/immer/detail/type_traits.hpp index 7820e75d7a..5137156266 100644 --- a/src/immer/detail/type_traits.hpp +++ b/src/immer/detail/type_traits.hpp @@ -167,7 +167,7 @@ struct std_distance_supports : std::false_type {}; template struct std_distance_supports -(), std::declval()))>> : +(), std::declval()))>> : std::true_type {}; template @@ -180,11 +180,11 @@ template struct std_uninitialized_copy_supports (), std::declval(), - std::declval()))>> : + std::declval()))>> : std::true_type {}; template -constexpr bool std_uninitialized_copy_supports_v = +constexpr bool std_uninitialized_copy_supports_v = std_uninitialized_copy_supports::value; } diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index 3ecfb732fe..fbbaa0f71c 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -307,7 +307,7 @@ private Q_SLOTS: /** Show progress dialog e.g. for verifychain */ void showProgress(const QString &title, int nProgress); - + /** When hideTrayIcon setting is changed in OptionsModel hide or show the icon accordingly. */ void setTrayIconVisible(bool); diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index 1784f77f8a..c0ed04d196 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -171,9 +171,9 @@ namespace GUIUtil // Open debug.log void openDebugLogfile(); - + // Open dash.conf - void openConfigfile(); + void openConfigfile(); // Browse backup folder void showBackups(); diff --git a/src/qt/macnotificationhandler.mm b/src/qt/macnotificationhandler.mm index fd15586630..769282305a 100644 --- a/src/qt/macnotificationhandler.mm +++ b/src/qt/macnotificationhandler.mm @@ -64,7 +64,7 @@ MacNotificationHandler *MacNotificationHandler::instance() static MacNotificationHandler *s_instance = nullptr; if (!s_instance) { s_instance = new MacNotificationHandler(); - + Class aPossibleClass = objc_getClass("NSBundle"); if (aPossibleClass) { // change NSBundle -bundleIdentifier method to return a correct bundle identifier diff --git a/src/qt/modaloverlay.cpp b/src/qt/modaloverlay.cpp index 0aa60d56eb..e5b31491ee 100644 --- a/src/qt/modaloverlay.cpp +++ b/src/qt/modaloverlay.cpp @@ -114,7 +114,7 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri ui->progressIncreasePerH->setText(QString::number(progressPerHour * 100, 'f', 2)+"%"); // show expected remaining time - if(remainingMSecs >= 0) { + if(remainingMSecs >= 0) { ui->expectedTimeLeft->setText(GUIUtil::formatNiceTimeOffset(remainingMSecs / 1000.0)); } else { ui->expectedTimeLeft->setText(QObject::tr("unknown")); diff --git a/src/qt/optionsdialog.h b/src/qt/optionsdialog.h index cc0bfdb00b..6ca5d246e5 100644 --- a/src/qt/optionsdialog.h +++ b/src/qt/optionsdialog.h @@ -53,7 +53,7 @@ private Q_SLOTS: void on_resetButton_clicked(); void on_okButton_clicked(); void on_cancelButton_clicked(); - + void on_hideTrayIcon_stateChanged(int fState); void showRestartWarning(bool fPersistent = false); diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 89e39837dd..6acea84c52 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -64,7 +64,7 @@ void OptionsModel::Init(bool resetSettings) settings.setValue("fHideTrayIcon", false); fHideTrayIcon = settings.value("fHideTrayIcon").toBool(); Q_EMIT hideTrayIconChanged(fHideTrayIcon); - + if (!settings.contains("fMinimizeToTray")) settings.setValue("fMinimizeToTray", false); fMinimizeToTray = settings.value("fMinimizeToTray").toBool() && !fHideTrayIcon; diff --git a/src/qt/qvalidatedlineedit.h b/src/qt/qvalidatedlineedit.h index 66734cc9d4..9ad9e66ae2 100644 --- a/src/qt/qvalidatedlineedit.h +++ b/src/qt/qvalidatedlineedit.h @@ -34,7 +34,7 @@ public Q_SLOTS: Q_SIGNALS: void validationDidChange(QValidatedLineEdit *validatedLineEdit); - + private Q_SLOTS: void markValid(); void checkValidity(); diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp index 3bef035d12..27596601c7 100644 --- a/src/qt/sendcoinsentry.cpp +++ b/src/qt/sendcoinsentry.cpp @@ -32,7 +32,7 @@ SendCoinsEntry::SendCoinsEntry(QWidget* parent) : ui->deleteButton->setIcon(QIcon(":/icons/remove")); ui->deleteButton_is->setIcon(QIcon(":/icons/remove")); ui->deleteButton_s->setIcon(QIcon(":/icons/remove")); - + // normal dash address field GUIUtil::setupAddressWidget(ui->payTo, this, true); // just a label for displaying dash address(es) diff --git a/src/qt/trafficgraphwidget.cpp b/src/qt/trafficgraphwidget.cpp index c371e5800a..a89d353e2a 100644 --- a/src/qt/trafficgraphwidget.cpp +++ b/src/qt/trafficgraphwidget.cpp @@ -99,7 +99,7 @@ void TrafficGraphWidget::paintEvent(QPaintEvent *) const QString units = tr("KB/s"); const float yMarginText = 2.0; - + // draw lines painter.setPen(axisCol); for(float y = val; y < fMax; y += val) { diff --git a/src/reverse_iterator.h b/src/reverse_iterator.h index ab467f07c9..729d8c11cc 100644 --- a/src/reverse_iterator.h +++ b/src/reverse_iterator.h @@ -5,7 +5,7 @@ /** * Template used for reverse iteration in C++11 range-based for loops. - * + * * std::vector v = {1, 2, 3, 4, 5}; * for (auto x : reverse_iterate(v)) * std::cout << x << " "; @@ -15,21 +15,21 @@ template class reverse_range { T &m_x; - + public: explicit reverse_range(T &x) : m_x(x) {} - + auto begin() const -> decltype(this->m_x.rbegin()) { return m_x.rbegin(); } - + auto end() const -> decltype(this->m_x.rend()) { return m_x.rend(); } }; - + template reverse_range reverse_iterate(T &x) { diff --git a/src/rpc/governance.cpp b/src/rpc/governance.cpp index d6c925af8c..833a77a82f 100644 --- a/src/rpc/governance.cpp +++ b/src/rpc/governance.cpp @@ -138,7 +138,7 @@ void gobject_prepare_help(CWallet* const pwallet) UniValue gobject_prepare(const JSONRPCRequest& request) { CWallet* const pwallet = GetWalletForJSONRPCRequest(request); - if (request.fHelp || (request.params.size() != 5 && request.params.size() != 6 && request.params.size() != 8)) + if (request.fHelp || (request.params.size() != 5 && request.params.size() != 6 && request.params.size() != 8)) gobject_prepare_help(pwallet); if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index f696ef27ce..8a7b75f909 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -87,7 +87,7 @@ bool static IsCompressedOrUncompressedPubKey(const valtype &vchPubKey) { * Where R and S are not negative (their first byte has its highest bit not set), and not * excessively padded (do not start with a 0 byte, unless an otherwise negative number follows, * in which case a single 0 byte is necessary and even required). - * + * * See https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623 * * This function is consensus-critical since BIP66. @@ -127,7 +127,7 @@ bool static IsValidSignatureEncoding(const std::vector &sig) { // Verify that the length of the signature matches the sum of the length // of the elements. if ((size_t)(lenR + lenS + 7) != sig.size()) return false; - + // Check whether the R element is an integer. if (sig[2] != 0x02) return false; @@ -843,7 +843,7 @@ bool EvalScript(std::vector >& stack, const CScript& popstack(stack); stack.push_back(vchHash); } - break; + break; case OP_CODESEPARATOR: { diff --git a/src/serialize.h b/src/serialize.h index 26bc5b319b..0b4835af1f 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -170,11 +170,11 @@ template const X& ReadWriteAsHelper(const X& x) { return x; } #define READWRITEMANY(...) (::SerReadWriteMany(s, ser_action, __VA_ARGS__)) #define READWRITEAS(type, obj) (::SerReadWriteMany(s, ser_action, ReadWriteAsHelper(obj))) -/** +/** * Implement three methods for serializable objects. These are actually wrappers over * "SerializationOp" template, which implements the body of each class' serialization * code. Adding "ADD_SERIALIZE_METHODS" in the body of the class causes these wrappers to be - * added as members. + * added as members. */ #define ADD_SERIALIZE_METHODS \ template \ @@ -304,16 +304,16 @@ uint64_t ReadCompactSize(Stream& is) * sure the encoding is one-to-one, one is subtracted from all but the last digit. * Thus, the byte sequence a[] with length len, where all but the last byte * has bit 128 set, encodes the number: - * + * * (a[len-1] & 0x7F) + sum(i=1..len-1, 128^i*((a[len-i-1] & 0x7F)+1)) - * + * * Properties: * * Very small (0-127: 1 byte, 128-16511: 2 bytes, 16512-2113663: 3 bytes) * * Every integer has exactly one encoding * * Encoding does not depend on size of original integer type * * No redundancy: every (infinite) byte sequence corresponds to a list * of encoded integers. - * + * * 0: [0x00] 256: [0x81 0x00] * 1: [0x01] 16383: [0xFE 0x7F] * 127: [0x7F] 16384: [0xFF 0x00] diff --git a/src/streams.h b/src/streams.h index 446bb0ec87..69c9747f82 100644 --- a/src/streams.h +++ b/src/streams.h @@ -580,7 +580,7 @@ private: const int nType; const int nVersion; - FILE* file; + FILE* file; public: CAutoFile(FILE* filenew, int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn) diff --git a/src/test/README.md b/src/test/README.md index f279f25e6c..ce215b56a3 100644 --- a/src/test/README.md +++ b/src/test/README.md @@ -43,11 +43,11 @@ unit tests as possible). The build system is setup to compile an executable called `test_dash` that runs all of the unit tests. The main source file is called test_dash.cpp. To add a new unit test file to our test suite you need -to add the file to `src/Makefile.test.include`. The pattern is to create -one test file for each class or source file for which you want to create -unit tests. The file naming convention is `_tests.cpp` -and such files should wrap their tests in a test suite -called `_tests`. For an example of this pattern, +to add the file to `src/Makefile.test.include`. The pattern is to create +one test file for each class or source file for which you want to create +unit tests. The file naming convention is `_tests.cpp` +and such files should wrap their tests in a test suite +called `_tests`. For an example of this pattern, examine `uint256_tests.cpp`. For further reading, I found the following website to be helpful in diff --git a/src/test/data/base58_keys_invalid.json b/src/test/data/base58_keys_invalid.json index e04a1106cd..500f11cf8b 100644 --- a/src/test/data/base58_keys_invalid.json +++ b/src/test/data/base58_keys_invalid.json @@ -1,151 +1,151 @@ [ [ "" - ], + ], [ "x" - ], + ], [ "8212abd8rrzcJmBG9n7VmSpaMfPRXhyHkQtNXFAMPCUqQTF9Kmsk5VF3b81x1qt9tRsQ2REKQ6j" - ], + ], [ "5CPYCiRk7LjiYQc45GQTgqNjYw5tWeCZd1NWvevf6SQfJvDm9vK" - ], + ], [ "2UB8YkLAsoJWEsw6daxKvo5W4NVjLSB8Bsko6UCWMrLnoFKgETXdKa2XcvoWdjeeLbKqRcaWwGvq" - ], + ], [ "9sW9vnbLHfdcqhU2n5bLAFUksSgCiMBVmdn6Pae3iTYo49aSqZeS" - ], + ], [ "2FeLT8g7q25cvVmUjQnXvTt7rpWDtRjq2oi9F9zj3rLWxNKSoKcPLob6TEB2RAeumauRzj5Em5uL" - ], + ], [ "7Vbg3REusN6tagLwHkz4P71VZtp8oTTtETmaTFJfypdX4J7vBmp6CMzWpNV3RUdv7TST2nigUz2oU" - ], + ], [ "7obK6DhucEuvCinKLAUNYMPXNEFCHcErXa61wi2sMi66owinM4E8YD4rkgHVvxpv3ZGxFNXUyCA" - ], + ], [ "3FPe28dxJDhEmkAbGVgsT5XFpBwyM48FK4veyiQVgAKvQLTea2U" - ], + ], [ "2ULU3PB7u3rxfUXKVb5mZ4ijXbj85LN99s7zess5XPZEX1DJvanHoY6dLvYnkLtQDWQ2qCq1GWSA" - ], + ], [ "7VBmPmJMUFwYhgktivvqBZcPzqdKPy4S4RRTACdwTiV6wNpkpXEmp3tvDhzkqdyFhXdJ88Q5T9mka" - ], + ], [ "2Zx1G5CMrEC4Y8EBVxvepmM1aiXv7CenqUR1dZBxC4PFUv9jAAm8TUxD4SKC2ArwKawA3Y4rhC2v" - ], + ], [ "yaWZmeqWr5Mea62ECoMPzVkXxHGDF6LtCfc" - ], + ], [ "7VPs36WGcbdFsCBsMXExgBoMeme8T7eJ4g3UMqQrhrA2Lyys5vi3dgH43nbz1AV4YFz3ZRKLdFsnu" - ], + ], [ "2DS5LTr3AgrTGoBD3nqXWDPtCMd98mkop4wxaVfRWwPFYvmpXP5hG5bKzVVzvsKzP89THiiRd3Pr" - ], + ], [ "DeRXybcZve86XXanvmLG9XwFadEh8GjH2Y" - ], + ], [ "7pejnWw1qHjCfAmzXoStxFZYMJ6hu1gixoJD8irtyrki5A9PHDWV798YMaH3teBadyatmdV2YvT" - ], + ], [ "4Yi2yBokcAj6acLZhiNwmmA1DSzuKnz8vfJ1FHE2yJLSTab6FUi" - ], + ], [ "2U65F6JTxDP2YJ5XV6FiYxpWMCjwCRbEN9ygEXZ3KkbLUMjSbvKbPyCMLf6ke9kMPg9CLQcJ7aN9" - ], + ], [ "7UgNNEAfdinxDG38ByGmVwbRJp7b4q8BEznm2GXbSJFVSTyS3jiByNLU8ckDprYkqvi5bcf61SUkw" - ], + ], [ "6wzMif8TRzrnyQYAbRZShWcZo3dqKYkBVpi2JR15DFMCLzxAkVTUpsuwdTUWnkx9j1kGDyukh1Go" - ], + ], [ "6YKZfgYJSh9ivzFX1oNqTiiWwhCGrZbnDCigU6N5oyiBeVUKio5ww3Zu4N6K6NHsqaR8djSh9dLfX" - ], + ], [ "92sWK7QesAPWS12srisHmc9q8Fz8Z5ERJcAaVwkjVKENJmL45bBM" - ], + ], [ "2Ua8heeYCTTsr5qgi7vorTpDAWVRGRAJKZ7" - ], + ], [ "2A6BvvmZ86GG7TRwXyCaCvhiM5FsVFvs42x" - ], + ], [ "R5uiBq2rzVGhxDsq3MeGU3QKeZz8wLywaB" - ], + ], [ "279AcBMDWxh5hnfEm5kptwnfn7rEWschhdxkEzLYzEj2K3wSHfEaqV2moec6wP5w3jVy5cFhoVXk" - ], + ], [ "7VMRsPVwoj7vZATKQGj2yVEX55f2qNKDxNiw7YNJv1zjfFFzyWR1WS67tefp7fV1MpXrUhNh86e8Y" - ], + ], [ "2V95nNKY2YtDuxyQ6K4unrkKQTmhRpVcUiXdYKxfJSrQG22tHmNojaXc5gUy1ZY6cAByCBMZZsas" - ], + ], [ "2D79xmaAZxTf2fMRsTGgkNfMrUErj5CqXNY" - ], + ], [ "7nwQ595A7nXdySFQ2pHx71xJsVLhJAeoj68MSSDHhPMxhBQDynYa5KDXEfhW8jZdZeAkraFMy7b" - ], + ], [ "7rLMRn8VSmsGV1QUfZf5xro5gejEST4fuXpokKSvqPPX8wmMabe" - ], + ], [ "J3JtSQiZ46yXNEXpuzjmA7R366BBKMD7id5PZ7cX3V5K5DcP3M9L" - ], + ], [ "21WFTGZEpLyGHqVmb7a5skPDN5oD7ocR7r6t2osiqDQf6Xa84mkh3odE1cbZ2ocTFMZbHSrLXyJr" - ], + ], [ "7oShSMyZqoK69tWvUEwLBGWHzZFvuVV5SESa4rBe3TmNzfJXBJBP528XMMMiQxoX7fSAzhF2bYL" - ], + ], [ "KqarYQ2A4jimBefL5i1SRpbz8xn3y3P2UX1tafCgf48LXTDrKCcf" - ], + ], [ "gSzq4StFrs2i8gTZ84pw9x68aPQ3XFe5b3oK669aSd68yfFmxH" - ], + ], [ "7UdhV95GSa6CY2XjVYfrqrwwyCScmeksu6TCqcpRSeeMbEmDydSMB4E2CCHFZ4gLoXXB7z1iWsGws" - ], + ], [ "2msvzdVt86YVXqkWQBJG136u11REi8cXpn1" - ], + ], [ "ryMiy7TSV4LfnJWeXdvT9sZgiLj6ebNg2ac6eLdSAE1N66u1SHwASam7njVBMLYuzr8ntySNoUT" - ], + ], [ "6YnxQpwLv2PWVRw8cf5JVm1HmLP3UrQyyUMufDLzuYRg1vbut9he27XAzmLp7m4WxTz7vsriEwQcX" - ], + ], [ "92g6icyL3H2XCqLiukqquX15fwBR5kFE744En5cd3X61cpANrjqY" - ], + ], [ "2XCxe9EpeGVMkfZqFgtAKmU2GNBpwnmukDs" - ], + ], [ "6YdrW3VDyE96kBFvKghrZ6fkwVngGgJybFnrFHXfexSorcQPxzbHLqNWTSMZHkrdmeQ2ZsLCnFhe3" - ], + ], [ "PsfkAxuhDQKQCwvuwfiVo1vdcYc4fLLr7oZ98XrMyp7SAsLAyQorF" - ], + ], [ "2k2HeazZ1apwsF3VQHHCbooreJ2anjumTTU" - ], + ], [ "724Fw3TFoSoXsZK77FC8NfrgN2scVC8pq7SntoNgCY3oosmEZHJLcrZVKiFagFm5TLcbfuhKm8ewM" - ], + ], [ "7VrbcSqCJndcp187BT68T5eLXF3TQaH7vN57nAhNhbCyUjtvuX6rtDJYNLmXhPTSrE5dkWqifSsRG" - ], + ], [ "8SHxzARcUKM6NdLyM4JDSMoSkA99SgZ3zP85JAEaiipxnUXuMBtV7dtx6cN1wP5df4bQ8G6MsMv" ] diff --git a/src/test/data/script_tests.json b/src/test/data/script_tests.json index 0ebd66c558..a63a25881b 100644 --- a/src/test/data/script_tests.json +++ b/src/test/data/script_tests.json @@ -712,7 +712,7 @@ ["0x17 0x3014020002107777777777777777777777777777777701", "0 CHECKSIG NOT", "", "OK", "Zero-length R is correctly encoded"], ["0x17 0x3014021077777777777777777777777777777777020001", "0 CHECKSIG NOT", "", "OK", "Zero-length S is correctly encoded for DERSIG"], ["0x27 0x302402107777777777777777777777777777777702108777777777777777777777777777777701", "0 CHECKSIG NOT", "", "OK", "Negative S is correctly encoded"], - + ["2147483648", "CHECKSEQUENCEVERIFY", "CHECKSEQUENCEVERIFY", "OK", "CSV passes if stack top bit 1 << 31 is set"], ["", "DEPTH", "P2SH,STRICTENC", "EVAL_FALSE", "Test the test: we should have an empty stack after scriptSig evaluation"], diff --git a/src/test/dbwrapper_tests.cpp b/src/test/dbwrapper_tests.cpp index 251648a46d..753e2fb45a 100644 --- a/src/test/dbwrapper_tests.cpp +++ b/src/test/dbwrapper_tests.cpp @@ -20,9 +20,9 @@ bool is_null_key(const std::vector& key) { return isnull; } - + BOOST_FIXTURE_TEST_SUITE(dbwrapper_tests, BasicTestingSetup) - + BOOST_AUTO_TEST_CASE(dbwrapper) { // Perform tests both obfuscated and non-obfuscated. @@ -142,7 +142,7 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate) // Now, set up another wrapper that wants to obfuscate the same directory CDBWrapper odbw(ph, (1 << 10), false, false, true); - // Check that the key/val we wrote with unobfuscated wrapper exists and + // Check that the key/val we wrote with unobfuscated wrapper exists and // is readable. uint256 res2; BOOST_CHECK(odbw.Read(key, res2)); @@ -153,13 +153,13 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate) uint256 in2 = InsecureRand256(); uint256 res3; - + // Check that we can write successfully BOOST_CHECK(odbw.Write(key, in2)); BOOST_CHECK(odbw.Read(key, res3)); BOOST_CHECK_EQUAL(res3.ToString(), in2.ToString()); } - + // Ensure that we start obfuscating during a reindex. BOOST_AUTO_TEST_CASE(existing_data_reindex) { @@ -190,7 +190,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex) uint256 in2 = InsecureRand256(); uint256 res3; - + // Check that we can write successfully BOOST_CHECK(odbw.Write(key, in2)); BOOST_CHECK(odbw.Read(key, res3)); diff --git a/src/test/governance_validators_tests.cpp b/src/test/governance_validators_tests.cpp index 7dca3252c8..7338f739de 100644 --- a/src/test/governance_validators_tests.cpp +++ b/src/test/governance_validators_tests.cpp @@ -28,7 +28,7 @@ std::string CreateEncodedProposalObject(const UniValue& objJSON) UniValue outerArray(UniValue::VARR); outerArray.push_back(innerArray); - + std::string strData = outerArray.write(); std::string strHex = HexStr(strData); return strHex; diff --git a/src/test/limitedmap_tests.cpp b/src/test/limitedmap_tests.cpp index 05feee3fa0..52e12abf05 100644 --- a/src/test/limitedmap_tests.cpp +++ b/src/test/limitedmap_tests.cpp @@ -50,10 +50,10 @@ BOOST_AUTO_TEST_CASE(limitedmap_test) // use the iterator to check for the expected key and value //BOOST_CHECK(it->first == i); //BOOST_CHECK(it->second == i + 1); - + // use find to check for the value BOOST_CHECK(map.find(i)->second == i + 1); - + // update and recheck auto jt = map.find(i); map.update(jt, i + 2); diff --git a/src/test/mempool_tests.cpp b/src/test/mempool_tests.cpp index 57db8df152..7babf45cd2 100644 --- a/src/test/mempool_tests.cpp +++ b/src/test/mempool_tests.cpp @@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE(MempoolRemoveTest) poolSize = testPool.size(); testPool.removeRecursive(txParent); BOOST_CHECK_EQUAL(testPool.size(), poolSize - 1); - + // Parent, children, grandchildren: testPool.addUnchecked(txParent.GetHash(), entry.FromTx(txParent)); for (int i = 0; i < 3; i++) diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp index db740a07c2..ccf7651492 100644 --- a/src/test/net_tests.cpp +++ b/src/test/net_tests.cpp @@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE(cnode_simple_test) in_addr ipv4Addr; ipv4Addr.s_addr = 0xa0b0c001; - + CAddress addr = CAddress(CService(ipv4Addr, 7777), NODE_NETWORK); std::string pszDest; bool fInboundIn = false; diff --git a/src/test/prevector_tests.cpp b/src/test/prevector_tests.cpp index 6eeb537ae4..b16f90779d 100644 --- a/src/test/prevector_tests.cpp +++ b/src/test/prevector_tests.cpp @@ -36,7 +36,7 @@ class prevector_tester { { local_check(a == b); } - void local_check(bool b) + void local_check(bool b) { passed &= b; } diff --git a/src/test/raii_event_tests.cpp b/src/test/raii_event_tests.cpp index 0db67dac64..6a6055fb52 100644 --- a/src/test/raii_event_tests.cpp +++ b/src/test/raii_event_tests.cpp @@ -41,7 +41,7 @@ BOOST_FIXTURE_TEST_SUITE(raii_event_tests, BasicTestingSetup) BOOST_AUTO_TEST_CASE(raii_event_creation) { event_set_mem_functions(tag_malloc, realloc, tag_free); - + void* base_ptr = nullptr; { auto base = obtain_event_base(); @@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE(raii_event_creation) BOOST_CHECK(tags[base_ptr] == 1); } BOOST_CHECK(tags[base_ptr] == 0); - + void* event_ptr = nullptr; { auto base = obtain_event_base(); @@ -63,14 +63,14 @@ BOOST_AUTO_TEST_CASE(raii_event_creation) } BOOST_CHECK(tags[base_ptr] == 0); BOOST_CHECK(tags[event_ptr] == 0); - + event_set_mem_functions(malloc, realloc, free); } BOOST_AUTO_TEST_CASE(raii_event_order) { event_set_mem_functions(tag_malloc, realloc, tag_free); - + void* base_ptr = nullptr; void* event_ptr = nullptr; { diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index a38404c7d2..8bd829f5ff 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -439,7 +439,7 @@ BOOST_AUTO_TEST_CASE(script_build) tests.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0C) << OP_CHECKSIG, "P2SH(P2PK), bad redeemscript", SCRIPT_VERIFY_P2SH, true ).PushSig(keys.key0).PushRedeem().DamagePush(10).ScriptError(SCRIPT_ERR_EVAL_FALSE)); - + tests.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << ToByteVector(keys.pubkey0.GetID()) << OP_EQUALVERIFY << OP_CHECKSIG, "P2SH(P2PKH)", SCRIPT_VERIFY_P2SH, true ).PushSig(keys.key0).Push(keys.pubkey0).PushRedeem()); diff --git a/src/test/serialize_tests.cpp b/src/test/serialize_tests.cpp index 351ea2a265..ccd06428a3 100644 --- a/src/test/serialize_tests.cpp +++ b/src/test/serialize_tests.cpp @@ -248,8 +248,8 @@ static bool isCanonicalException(const std::ios_base::failure& ex) // The string returned by what() can be different for different platforms. // Instead of directly comparing the ex.what() with an expected string, - // create an instance of exception to see if ex.what() matches - // the expected explanatory string returned by the exception instance. + // create an instance of exception to see if ex.what() matches + // the expected explanatory string returned by the exception instance. return strcmp(expectedException.what(), ex.what()) == 0; } diff --git a/src/test/streams_tests.cpp b/src/test/streams_tests.cpp index 42828556d1..f071c11609 100644 --- a/src/test/streams_tests.cpp +++ b/src/test/streams_tests.cpp @@ -156,19 +156,19 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor) CDataStream ds(in, 0, 0); // Degenerate case - + key.push_back('\x00'); key.push_back('\x00'); ds.Xor(key); BOOST_CHECK_EQUAL( - std::string(expected_xor.begin(), expected_xor.end()), + std::string(expected_xor.begin(), expected_xor.end()), std::string(ds.begin(), ds.end())); in.push_back('\x0f'); in.push_back('\xf0'); expected_xor.push_back('\xf0'); expected_xor.push_back('\x0f'); - + // Single character key ds.clear(); @@ -178,9 +178,9 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor) key.push_back('\xff'); ds.Xor(key); BOOST_CHECK_EQUAL( - std::string(expected_xor.begin(), expected_xor.end()), - std::string(ds.begin(), ds.end())); - + std::string(expected_xor.begin(), expected_xor.end()), + std::string(ds.begin(), ds.end())); + // Multi character key in.clear(); @@ -189,7 +189,7 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor) in.push_back('\x0f'); expected_xor.push_back('\x0f'); expected_xor.push_back('\x00'); - + ds.clear(); ds.insert(ds.begin(), in.begin(), in.end()); @@ -199,8 +199,8 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor) ds.Xor(key); BOOST_CHECK_EQUAL( - std::string(expected_xor.begin(), expected_xor.end()), - std::string(ds.begin(), ds.end())); -} + std::string(expected_xor.begin(), expected_xor.end()), + std::string(ds.begin(), ds.end())); +} BOOST_AUTO_TEST_SUITE_END() diff --git a/src/timedata.h b/src/timedata.h index 111b9e0ebd..bc281942a2 100644 --- a/src/timedata.h +++ b/src/timedata.h @@ -14,7 +14,7 @@ static const int64_t DEFAULT_MAX_TIME_ADJUSTMENT = 70 * 60; class CNetAddr; -/** +/** * Median filter over a stream of values. * Returns the median of the last N numbers */ diff --git a/src/txdb.cpp b/src/txdb.cpp index d2ab2362d3..1672d34ff2 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -58,7 +58,7 @@ struct CoinEntry { } -CCoinsViewDB::CCoinsViewDB(size_t nCacheSize, bool fMemory, bool fWipe) : db(GetDataDir() / "chainstate", nCacheSize, fMemory, fWipe, true) +CCoinsViewDB::CCoinsViewDB(size_t nCacheSize, bool fMemory, bool fWipe) : db(GetDataDir() / "chainstate", nCacheSize, fMemory, fWipe, true) { } diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 49073b95ba..f627da19f1 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -285,7 +285,7 @@ void CTxMemPool::UpdateForRemoveFromMempool(const setEntries &entriesToRemove, b // should be a bit faster. // However, if we happen to be in the middle of processing a reorg, then // the mempool can be in an inconsistent state. In this case, the set - // of ancestors reachable via mapLinks will be the same as the set of + // of ancestors reachable via mapLinks will be the same as the set of // ancestors whose packages include this transaction, because when we // add a new transaction to the mempool in addUnchecked(), we assume it // has no children, and in the case of a reorg where that assumption is diff --git a/src/txmempool.h b/src/txmempool.h index c88b7ade34..c89069154b 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -729,7 +729,7 @@ private: void removeUnchecked(txiter entry, MemPoolRemovalReason reason = MemPoolRemovalReason::UNKNOWN) EXCLUSIVE_LOCKS_REQUIRED(cs); }; -/** +/** * CCoinsView that brings transactions from a mempool into view. * It does not check for spendings by memory pool transactions. * Instead, it provides access to all Coins which are either unspent in the diff --git a/src/validation.h b/src/validation.h index 6e0ba4561d..580be95353 100644 --- a/src/validation.h +++ b/src/validation.h @@ -221,7 +221,7 @@ static const unsigned int DEFAULT_CHECKLEVEL = 3; // Setting the target to > than 945MB will make it likely we can respect the target. static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 945 * 1024 * 1024; -/** +/** * Process an incoming block. This only returns after the best known valid * block is made active. Note that it does not, however, guarantee that the * specific block passed to it has been checked for validity! @@ -373,7 +373,7 @@ bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints* lp = null /** * Closure representing one script verification - * Note that this stores references to the spending transaction + * Note that this stores references to the spending transaction */ class CScriptCheck { diff --git a/test/README.md b/test/README.md index 9006ccc848..83a8b245ba 100644 --- a/test/README.md +++ b/test/README.md @@ -5,7 +5,7 @@ etc. There are currently two sets of tests in this directory: -- [functional](/test/functional) which test the functionality of +- [functional](/test/functional) which test the functionality of dashd and dash-qt by interacting with them through the RPC and P2P interfaces. - [util](/test/util) which tests the dash utilities, currently only @@ -188,5 +188,5 @@ Use the `-v` option for verbose output. # Writing functional tests You are encouraged to write functional tests for new or existing features. -Further information about the functional test framework and individual +Further information about the functional test framework and individual tests is found in [test/functional](/test/functional). diff --git a/test/functional/feature_bip68_sequence.py b/test/functional/feature_bip68_sequence.py index bfca0af681..724526b7b5 100755 --- a/test/functional/feature_bip68_sequence.py +++ b/test/functional/feature_bip68_sequence.py @@ -67,7 +67,7 @@ class BIP68Test(BitcoinTestFramework): # If sequence locks were used, this would require 1 block for the # input to mature. sequence_value = SEQUENCE_LOCKTIME_DISABLE_FLAG | 1 - tx1.vin = [CTxIn(COutPoint(int(utxo["txid"], 16), utxo["vout"]), nSequence=sequence_value)] + tx1.vin = [CTxIn(COutPoint(int(utxo["txid"], 16), utxo["vout"]), nSequence=sequence_value)] tx1.vout = [CTxOut(value, CScript([b'a']))] tx1_signed = self.nodes[0].signrawtransaction(ToHex(tx1))["hex"] diff --git a/test/functional/feature_maxuploadtarget.py b/test/functional/feature_maxuploadtarget.py index e095faa423..0aea5201e6 100755 --- a/test/functional/feature_maxuploadtarget.py +++ b/test/functional/feature_maxuploadtarget.py @@ -104,7 +104,7 @@ class MaxUploadTest(BitcoinTestFramework): assert_equal(p2p_conns[0].block_receive_map[big_old_block], i+1) assert_equal(len(self.nodes[0].getpeerinfo()), 3) - # At most a couple more tries should succeed (depending on how long + # At most a couple more tries should succeed (depending on how long # the test has been running so far). for i in range(3): p2p_conns[0].send_message(getdata_request) diff --git a/test/functional/feature_multikeysporks.py b/test/functional/feature_multikeysporks.py index a229f00f3d..695c08a007 100755 --- a/test/functional/feature_multikeysporks.py +++ b/test/functional/feature_multikeysporks.py @@ -12,8 +12,8 @@ feature_multikeysporks.py Test logic for several signer keys usage for spork broadcast. -We set 5 possible keys for sporks signing and set minimum -required signers to 3. We check 1 and 2 signers can't set the spork +We set 5 possible keys for sporks signing and set minimum +required signers to 3. We check 1 and 2 signers can't set the spork value, any 3 signers can change spork value and other 3 signers can change it again. ''' diff --git a/test/functional/feature_proxy.py b/test/functional/feature_proxy.py index 166ee33725..707f4fc7f3 100755 --- a/test/functional/feature_proxy.py +++ b/test/functional/feature_proxy.py @@ -79,9 +79,9 @@ class ProxyTest(BitcoinTestFramework): # Note: proxies are not used to connect to local nodes # this is because the proxy to use is based on CService.GetNetwork(), which return NET_UNROUTABLE for localhost args = [ - ['-listen', '-proxy=%s:%i' % (self.conf1.addr),'-proxyrandomize=1'], - ['-listen', '-proxy=%s:%i' % (self.conf1.addr),'-onion=%s:%i' % (self.conf2.addr),'-proxyrandomize=0'], - ['-listen', '-proxy=%s:%i' % (self.conf2.addr),'-proxyrandomize=1'], + ['-listen', '-proxy=%s:%i' % (self.conf1.addr),'-proxyrandomize=1'], + ['-listen', '-proxy=%s:%i' % (self.conf1.addr),'-onion=%s:%i' % (self.conf2.addr),'-proxyrandomize=0'], + ['-listen', '-proxy=%s:%i' % (self.conf2.addr),'-proxyrandomize=1'], [] ] if self.have_ipv6: diff --git a/test/functional/test_framework/blocktools.py b/test/functional/test_framework/blocktools.py index 67a6328241..f6730063f2 100644 --- a/test/functional/test_framework/blocktools.py +++ b/test/functional/test_framework/blocktools.py @@ -42,7 +42,7 @@ def serialize_script_num(value): # otherwise an anyone-can-spend output. def create_coinbase(height, pubkey = None, dip4_activated=False): coinbase = CTransaction() - coinbase.vin.append(CTxIn(COutPoint(0, 0xffffffff), + coinbase.vin.append(CTxIn(COutPoint(0, 0xffffffff), ser_string(serialize_script_num(height)), 0xffffffff)) coinbaseoutput = CTxOut() coinbaseoutput.nValue = 500 * COIN diff --git a/test/functional/wallet_txn_clone.py b/test/functional/wallet_txn_clone.py index b0d1d374aa..eeb871ccf6 100755 --- a/test/functional/wallet_txn_clone.py +++ b/test/functional/wallet_txn_clone.py @@ -45,11 +45,11 @@ class TxnMallTest(BitcoinTestFramework): # Coins are sent to node1_address node1_address = self.nodes[1].getnewaddress("from0") - # Send tx1, and another transaction tx2 that won't be cloned + # Send tx1, and another transaction tx2 that won't be cloned txid1 = self.nodes[0].sendfrom("foo", node1_address, 400, 0) txid2 = self.nodes[0].sendfrom("bar", node1_address, 200, 0) - # Construct a clone of tx1, to be malleated + # Construct a clone of tx1, to be malleated rawtx1 = self.nodes[0].getrawtransaction(txid1,1) clone_inputs = [{"txid":rawtx1["vin"][0]["txid"],"vout":rawtx1["vin"][0]["vout"]}] clone_outputs = {rawtx1["vout"][0]["scriptPubKey"]["addresses"][0]:rawtx1["vout"][0]["value"], @@ -130,7 +130,7 @@ class TxnMallTest(BitcoinTestFramework): # Check node0's total balance; should be same as before the clone, + 1000 DASH for 2 matured, # less possible orphaned matured subsidy expected += 1000 - if (self.options.mine_block): + if (self.options.mine_block): expected -= 500 assert_equal(self.nodes[0].getbalance(), expected) assert_equal(self.nodes[0].getbalance("*", 0), expected)