mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
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 <pasta@dashboost.org>
This commit is contained in:
parent
a744c56682
commit
c49e506176
@ -371,7 +371,7 @@ CAddrInfo CAddrMan::Select_(bool newOnly)
|
|||||||
|
|
||||||
// Use a 50% chance for choosing between tried and new table entries.
|
// Use a 50% chance for choosing between tried and new table entries.
|
||||||
if (!newOnly &&
|
if (!newOnly &&
|
||||||
(nTried > 0 && (nNew == 0 || RandomInt(2) == 0))) {
|
(nTried > 0 && (nNew == 0 || RandomInt(2) == 0))) {
|
||||||
// use a tried node
|
// use a tried node
|
||||||
double fChanceFactor = 1.0;
|
double fChanceFactor = 1.0;
|
||||||
while (1) {
|
while (1) {
|
||||||
|
@ -183,7 +183,7 @@ public:
|
|||||||
#define ADDRMAN_SET_TRIED_COLLISION_SIZE 10
|
#define ADDRMAN_SET_TRIED_COLLISION_SIZE 10
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stochastical (IP) address manager
|
* Stochastical (IP) address manager
|
||||||
*/
|
*/
|
||||||
class CAddrMan
|
class CAddrMan
|
||||||
{
|
{
|
||||||
|
@ -251,7 +251,7 @@ bool CBloomFilter::IsRelevantAndUpdate(const CTransaction& tx)
|
|||||||
const CTxOut& txout = tx.vout[i];
|
const CTxOut& txout = tx.vout[i];
|
||||||
// Match if the filter contains any arbitrary script data element in any scriptPubKey in tx
|
// 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.
|
// 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.
|
// is discovered in order to find spending transactions, which avoids round-tripping and race conditions.
|
||||||
if(CheckScript(txout.scriptPubKey)) {
|
if(CheckScript(txout.scriptPubKey)) {
|
||||||
fFound = true;
|
fFound = true;
|
||||||
|
@ -35,9 +35,9 @@ enum bloomflags
|
|||||||
/**
|
/**
|
||||||
* BloomFilter is a probabilistic filter which SPV clients provide
|
* BloomFilter is a probabilistic filter which SPV clients provide
|
||||||
* so that we can filter the transactions we send them.
|
* so that we can filter the transactions we send them.
|
||||||
*
|
*
|
||||||
* This allows for significantly more efficient transaction and block downloads.
|
* This allows for significantly more efficient transaction and block downloads.
|
||||||
*
|
*
|
||||||
* Because bloom filters are probabilistic, a SPV node can increase the false-
|
* Because bloom filters are probabilistic, a SPV node can increase the false-
|
||||||
* positive rate, making us send it transactions which aren't actually its,
|
* positive rate, making us send it transactions which aren't actually its,
|
||||||
* allowing clients to trade more bandwidth for more privacy by obfuscating which
|
* allowing clients to trade more bandwidth for more privacy by obfuscating which
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
class CCheckQueueControl;
|
class CCheckQueueControl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Queue for verifications that have to be performed.
|
* Queue for verifications that have to be performed.
|
||||||
* The verifications are represented by a type T, which must provide an
|
* The verifications are represented by a type T, which must provide an
|
||||||
* operator(), returning a bool.
|
* operator(), returning a bool.
|
||||||
@ -163,7 +163,7 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RAII-style controller object for a CCheckQueue that guarantees the passed
|
* RAII-style controller object for a CCheckQueue that guarantees the passed
|
||||||
* queue is finished before continuing.
|
* queue is finished before continuing.
|
||||||
*/
|
*/
|
||||||
|
@ -81,8 +81,8 @@ std::string FormatFullVersion()
|
|||||||
return CLIENT_BUILD;
|
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<std::string>& comments)
|
std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments)
|
||||||
{
|
{
|
||||||
|
@ -203,7 +203,7 @@ class CCoinsViewCache : public CCoinsViewBacked
|
|||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* Make mutable so that we can "fill the cache" even from Get-methods
|
* Make mutable so that we can "fill the cache" even from Get-methods
|
||||||
* declared as "const".
|
* declared as "const".
|
||||||
*/
|
*/
|
||||||
mutable uint256 hashBlock;
|
mutable uint256 hashBlock;
|
||||||
mutable CCoinsMap cacheCoins;
|
mutable CCoinsMap cacheCoins;
|
||||||
@ -280,7 +280,7 @@ public:
|
|||||||
//! Calculate the size of the cache (in bytes)
|
//! Calculate the size of the cache (in bytes)
|
||||||
size_t DynamicMemoryUsage() const;
|
size_t DynamicMemoryUsage() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount of dash coming in to a transaction
|
* Amount of dash coming in to a transaction
|
||||||
* Note that lightweight clients may not know anything besides the hash of previous transactions,
|
* Note that lightweight clients may not know anything besides the hash of previous transactions,
|
||||||
* so may not be able to calculate this.
|
* so may not be able to calculate this.
|
||||||
|
@ -41,7 +41,7 @@ unsigned int GetLegacySigOpCount(const CTransaction& tx);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Count ECDSA signature operations in pay-to-script-hash inputs.
|
* Count ECDSA signature operations in pay-to-script-hash inputs.
|
||||||
*
|
*
|
||||||
* @param[in] mapInputs Map of previous transactions that have outputs we're spending
|
* @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
|
* @return maximum number of sigops required to validate this transaction's inputs
|
||||||
* @see CTransaction::FetchInputs
|
* @see CTransaction::FetchInputs
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -26,10 +26,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -13,10 +13,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -13,10 +13,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -13,10 +13,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -13,10 +13,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -13,10 +13,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* 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_UNROLL number of loops to unroll (0/undef for full unroll)
|
||||||
* SPH_KECCAK_INTERLEAVE use bit-interleaving (32-bit type only)
|
* SPH_KECCAK_INTERLEAVE use bit-interleaving (32-bit type only)
|
||||||
* SPH_KECCAK_NOCOPY do not copy the state into local variables
|
* SPH_KECCAK_NOCOPY do not copy the state into local variables
|
||||||
*
|
*
|
||||||
* If there is no usable 64-bit type, the code automatically switches
|
* If there is no usable 64-bit type, the code automatically switches
|
||||||
* back to the 32-bit implementation.
|
* back to the 32-bit implementation.
|
||||||
*
|
*
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -13,10 +13,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -13,10 +13,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* 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
|
* This is the code needed to match the "reference implementation" as
|
||||||
* published on Nov 23rd, 2009, instead of the published specification.
|
* published on Nov 23rd, 2009, instead of the published specification.
|
||||||
*
|
*
|
||||||
|
|
||||||
#define AES_BIG_ENDIAN 1
|
#define AES_BIG_ENDIAN 1
|
||||||
#include "aes_helper.c"
|
#include "aes_helper.c"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -13,10 +13,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -13,10 +13,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -16,10 +16,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -15,10 +15,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -16,10 +16,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -15,10 +15,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* 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 sph_echo512_addbits_and_close(
|
||||||
void *cc, unsigned ub, unsigned n, void *dst);
|
void *cc, unsigned ub, unsigned n, void *dst);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -14,10 +14,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -15,10 +15,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -15,10 +15,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -15,10 +15,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* 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 sph_luffa512_addbits_and_close(
|
||||||
void *cc, unsigned ub, unsigned n, void *dst);
|
void *cc, unsigned ub, unsigned n, void *dst);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -17,10 +17,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* 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 sph_shavite512_addbits_and_close(
|
||||||
void *cc, unsigned ub, unsigned n, void *dst);
|
void *cc, unsigned ub, unsigned n, void *dst);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -15,10 +15,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -20,10 +20,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* ==========================(LICENSE BEGIN)============================
|
* ==========================(LICENSE BEGIN)============================
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
* "Software"), to deal in the Software without restriction, including
|
* "Software"), to deal in the Software without restriction, including
|
||||||
@ -26,10 +26,10 @@
|
|||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
* the following conditions:
|
* the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be
|
* The above copyright notice and this permission notice shall be
|
||||||
* included in all copies or substantial portions of the Software.
|
* included in all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -107,7 +107,7 @@ namespace ctpl {
|
|||||||
std::function<void(int id)> * _f = nullptr;
|
std::function<void(int id)> * _f = nullptr;
|
||||||
this->q.pop(_f);
|
this->q.pop(_f);
|
||||||
std::unique_ptr<std::function<void(int id)>> func(_f); // at return, delete the function even if an exception occurred
|
std::unique_ptr<std::function<void(int id)>> func(_f); // at return, delete the function even if an exception occurred
|
||||||
|
|
||||||
std::function<void(int)> f;
|
std::function<void(int)> f;
|
||||||
if (_f)
|
if (_f)
|
||||||
f = *_f;
|
f = *_f;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <streams.h>
|
#include <streams.h>
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic Dumping and Loading
|
* Generic Dumping and Loading
|
||||||
* ---------------------------
|
* ---------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -573,14 +573,14 @@ bool CGovernanceManager::ConfirmInventoryRequest(const CInv& inv)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MSG_GOVERNANCE_OBJECT_VOTE: {
|
case MSG_GOVERNANCE_OBJECT_VOTE: {
|
||||||
if (cmapVoteToObject.HasKey(inv.hash)) {
|
if (cmapVoteToObject.HasKey(inv.hash)) {
|
||||||
LogPrint(BCLog::GOBJECT, "CGovernanceManager::ConfirmInventoryRequest already have governance vote, returning false\n");
|
LogPrint(BCLog::GOBJECT, "CGovernanceManager::ConfirmInventoryRequest already have governance vote, returning false\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
LogPrint(BCLog::GOBJECT, "CGovernanceManager::ConfirmInventoryRequest unknown type, returning false\n");
|
LogPrint(BCLog::GOBJECT, "CGovernanceManager::ConfirmInventoryRequest unknown type, returning false\n");
|
||||||
return false;
|
return false;
|
||||||
|
@ -86,7 +86,7 @@ static void JSONErrorReply(HTTPRequest* req, const UniValue& objError, const Uni
|
|||||||
//This function checks username and password against -rpcauth
|
//This function checks username and password against -rpcauth
|
||||||
//entries from config file.
|
//entries from config file.
|
||||||
static bool multiUserAuthorized(std::string strUserPass)
|
static bool multiUserAuthorized(std::string strUserPass)
|
||||||
{
|
{
|
||||||
if (strUserPass.find(':') == std::string::npos) {
|
if (strUserPass.find(':') == std::string::npos) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ struct no_capacity
|
|||||||
|
|
||||||
template <typename Iter, typename Sent,
|
template <typename Iter, typename Sent,
|
||||||
std::enable_if_t
|
std::enable_if_t
|
||||||
<is_forward_iterator_v<Iter>
|
<is_forward_iterator_v<Iter>
|
||||||
&& compatible_sentinel_v<Iter, Sent>, bool> = true>
|
&& compatible_sentinel_v<Iter, Sent>, bool> = true>
|
||||||
static no_capacity from_range(Iter first, Sent last)
|
static no_capacity from_range(Iter first, Sent last)
|
||||||
{
|
{
|
||||||
|
@ -167,7 +167,7 @@ struct std_distance_supports : std::false_type {};
|
|||||||
|
|
||||||
template<typename T, typename U>
|
template<typename T, typename U>
|
||||||
struct std_distance_supports
|
struct std_distance_supports
|
||||||
<T, U, void_t<decltype(std::distance(std::declval<T>(), std::declval<U>()))>> :
|
<T, U, void_t<decltype(std::distance(std::declval<T>(), std::declval<U>()))>> :
|
||||||
std::true_type {};
|
std::true_type {};
|
||||||
|
|
||||||
template<typename T, typename U>
|
template<typename T, typename U>
|
||||||
@ -180,11 +180,11 @@ template<typename T, typename U, typename V>
|
|||||||
struct std_uninitialized_copy_supports
|
struct std_uninitialized_copy_supports
|
||||||
<T, U, V, void_t<decltype(std::uninitialized_copy(std::declval<T>(),
|
<T, U, V, void_t<decltype(std::uninitialized_copy(std::declval<T>(),
|
||||||
std::declval<U>(),
|
std::declval<U>(),
|
||||||
std::declval<V>()))>> :
|
std::declval<V>()))>> :
|
||||||
std::true_type {};
|
std::true_type {};
|
||||||
|
|
||||||
template<typename T, typename U, typename V>
|
template<typename T, typename U, typename V>
|
||||||
constexpr bool std_uninitialized_copy_supports_v =
|
constexpr bool std_uninitialized_copy_supports_v =
|
||||||
std_uninitialized_copy_supports<T, U, V>::value;
|
std_uninitialized_copy_supports<T, U, V>::value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ private Q_SLOTS:
|
|||||||
|
|
||||||
/** Show progress dialog e.g. for verifychain */
|
/** Show progress dialog e.g. for verifychain */
|
||||||
void showProgress(const QString &title, int nProgress);
|
void showProgress(const QString &title, int nProgress);
|
||||||
|
|
||||||
/** When hideTrayIcon setting is changed in OptionsModel hide or show the icon accordingly. */
|
/** When hideTrayIcon setting is changed in OptionsModel hide or show the icon accordingly. */
|
||||||
void setTrayIconVisible(bool);
|
void setTrayIconVisible(bool);
|
||||||
|
|
||||||
|
@ -171,9 +171,9 @@ namespace GUIUtil
|
|||||||
|
|
||||||
// Open debug.log
|
// Open debug.log
|
||||||
void openDebugLogfile();
|
void openDebugLogfile();
|
||||||
|
|
||||||
// Open dash.conf
|
// Open dash.conf
|
||||||
void openConfigfile();
|
void openConfigfile();
|
||||||
|
|
||||||
// Browse backup folder
|
// Browse backup folder
|
||||||
void showBackups();
|
void showBackups();
|
||||||
|
@ -64,7 +64,7 @@ MacNotificationHandler *MacNotificationHandler::instance()
|
|||||||
static MacNotificationHandler *s_instance = nullptr;
|
static MacNotificationHandler *s_instance = nullptr;
|
||||||
if (!s_instance) {
|
if (!s_instance) {
|
||||||
s_instance = new MacNotificationHandler();
|
s_instance = new MacNotificationHandler();
|
||||||
|
|
||||||
Class aPossibleClass = objc_getClass("NSBundle");
|
Class aPossibleClass = objc_getClass("NSBundle");
|
||||||
if (aPossibleClass) {
|
if (aPossibleClass) {
|
||||||
// change NSBundle -bundleIdentifier method to return a correct bundle identifier
|
// change NSBundle -bundleIdentifier method to return a correct bundle identifier
|
||||||
|
@ -114,7 +114,7 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri
|
|||||||
ui->progressIncreasePerH->setText(QString::number(progressPerHour * 100, 'f', 2)+"%");
|
ui->progressIncreasePerH->setText(QString::number(progressPerHour * 100, 'f', 2)+"%");
|
||||||
|
|
||||||
// show expected remaining time
|
// show expected remaining time
|
||||||
if(remainingMSecs >= 0) {
|
if(remainingMSecs >= 0) {
|
||||||
ui->expectedTimeLeft->setText(GUIUtil::formatNiceTimeOffset(remainingMSecs / 1000.0));
|
ui->expectedTimeLeft->setText(GUIUtil::formatNiceTimeOffset(remainingMSecs / 1000.0));
|
||||||
} else {
|
} else {
|
||||||
ui->expectedTimeLeft->setText(QObject::tr("unknown"));
|
ui->expectedTimeLeft->setText(QObject::tr("unknown"));
|
||||||
|
@ -53,7 +53,7 @@ private Q_SLOTS:
|
|||||||
void on_resetButton_clicked();
|
void on_resetButton_clicked();
|
||||||
void on_okButton_clicked();
|
void on_okButton_clicked();
|
||||||
void on_cancelButton_clicked();
|
void on_cancelButton_clicked();
|
||||||
|
|
||||||
void on_hideTrayIcon_stateChanged(int fState);
|
void on_hideTrayIcon_stateChanged(int fState);
|
||||||
|
|
||||||
void showRestartWarning(bool fPersistent = false);
|
void showRestartWarning(bool fPersistent = false);
|
||||||
|
@ -64,7 +64,7 @@ void OptionsModel::Init(bool resetSettings)
|
|||||||
settings.setValue("fHideTrayIcon", false);
|
settings.setValue("fHideTrayIcon", false);
|
||||||
fHideTrayIcon = settings.value("fHideTrayIcon").toBool();
|
fHideTrayIcon = settings.value("fHideTrayIcon").toBool();
|
||||||
Q_EMIT hideTrayIconChanged(fHideTrayIcon);
|
Q_EMIT hideTrayIconChanged(fHideTrayIcon);
|
||||||
|
|
||||||
if (!settings.contains("fMinimizeToTray"))
|
if (!settings.contains("fMinimizeToTray"))
|
||||||
settings.setValue("fMinimizeToTray", false);
|
settings.setValue("fMinimizeToTray", false);
|
||||||
fMinimizeToTray = settings.value("fMinimizeToTray").toBool() && !fHideTrayIcon;
|
fMinimizeToTray = settings.value("fMinimizeToTray").toBool() && !fHideTrayIcon;
|
||||||
|
@ -34,7 +34,7 @@ public Q_SLOTS:
|
|||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void validationDidChange(QValidatedLineEdit *validatedLineEdit);
|
void validationDidChange(QValidatedLineEdit *validatedLineEdit);
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void markValid();
|
void markValid();
|
||||||
void checkValidity();
|
void checkValidity();
|
||||||
|
@ -32,7 +32,7 @@ SendCoinsEntry::SendCoinsEntry(QWidget* parent) :
|
|||||||
ui->deleteButton->setIcon(QIcon(":/icons/remove"));
|
ui->deleteButton->setIcon(QIcon(":/icons/remove"));
|
||||||
ui->deleteButton_is->setIcon(QIcon(":/icons/remove"));
|
ui->deleteButton_is->setIcon(QIcon(":/icons/remove"));
|
||||||
ui->deleteButton_s->setIcon(QIcon(":/icons/remove"));
|
ui->deleteButton_s->setIcon(QIcon(":/icons/remove"));
|
||||||
|
|
||||||
// normal dash address field
|
// normal dash address field
|
||||||
GUIUtil::setupAddressWidget(ui->payTo, this, true);
|
GUIUtil::setupAddressWidget(ui->payTo, this, true);
|
||||||
// just a label for displaying dash address(es)
|
// just a label for displaying dash address(es)
|
||||||
|
@ -99,7 +99,7 @@ void TrafficGraphWidget::paintEvent(QPaintEvent *)
|
|||||||
|
|
||||||
const QString units = tr("KB/s");
|
const QString units = tr("KB/s");
|
||||||
const float yMarginText = 2.0;
|
const float yMarginText = 2.0;
|
||||||
|
|
||||||
// draw lines
|
// draw lines
|
||||||
painter.setPen(axisCol);
|
painter.setPen(axisCol);
|
||||||
for(float y = val; y < fMax; y += val) {
|
for(float y = val; y < fMax; y += val) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Template used for reverse iteration in C++11 range-based for loops.
|
* Template used for reverse iteration in C++11 range-based for loops.
|
||||||
*
|
*
|
||||||
* std::vector<int> v = {1, 2, 3, 4, 5};
|
* std::vector<int> v = {1, 2, 3, 4, 5};
|
||||||
* for (auto x : reverse_iterate(v))
|
* for (auto x : reverse_iterate(v))
|
||||||
* std::cout << x << " ";
|
* std::cout << x << " ";
|
||||||
@ -15,21 +15,21 @@ template <typename T>
|
|||||||
class reverse_range
|
class reverse_range
|
||||||
{
|
{
|
||||||
T &m_x;
|
T &m_x;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit reverse_range(T &x) : m_x(x) {}
|
explicit reverse_range(T &x) : m_x(x) {}
|
||||||
|
|
||||||
auto begin() const -> decltype(this->m_x.rbegin())
|
auto begin() const -> decltype(this->m_x.rbegin())
|
||||||
{
|
{
|
||||||
return m_x.rbegin();
|
return m_x.rbegin();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto end() const -> decltype(this->m_x.rend())
|
auto end() const -> decltype(this->m_x.rend())
|
||||||
{
|
{
|
||||||
return m_x.rend();
|
return m_x.rend();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
reverse_range<T> reverse_iterate(T &x)
|
reverse_range<T> reverse_iterate(T &x)
|
||||||
{
|
{
|
||||||
|
@ -138,7 +138,7 @@ void gobject_prepare_help(CWallet* const pwallet)
|
|||||||
UniValue gobject_prepare(const JSONRPCRequest& request)
|
UniValue gobject_prepare(const JSONRPCRequest& request)
|
||||||
{
|
{
|
||||||
CWallet* const pwallet = GetWalletForJSONRPCRequest(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);
|
gobject_prepare_help(pwallet);
|
||||||
|
|
||||||
if (!EnsureWalletIsAvailable(pwallet, request.fHelp))
|
if (!EnsureWalletIsAvailable(pwallet, request.fHelp))
|
||||||
|
@ -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
|
* 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,
|
* 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).
|
* in which case a single 0 byte is necessary and even required).
|
||||||
*
|
*
|
||||||
* See https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623
|
* See https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623
|
||||||
*
|
*
|
||||||
* This function is consensus-critical since BIP66.
|
* This function is consensus-critical since BIP66.
|
||||||
@ -127,7 +127,7 @@ bool static IsValidSignatureEncoding(const std::vector<unsigned char> &sig) {
|
|||||||
// Verify that the length of the signature matches the sum of the length
|
// Verify that the length of the signature matches the sum of the length
|
||||||
// of the elements.
|
// of the elements.
|
||||||
if ((size_t)(lenR + lenS + 7) != sig.size()) return false;
|
if ((size_t)(lenR + lenS + 7) != sig.size()) return false;
|
||||||
|
|
||||||
// Check whether the R element is an integer.
|
// Check whether the R element is an integer.
|
||||||
if (sig[2] != 0x02) return false;
|
if (sig[2] != 0x02) return false;
|
||||||
|
|
||||||
@ -843,7 +843,7 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
|
|||||||
popstack(stack);
|
popstack(stack);
|
||||||
stack.push_back(vchHash);
|
stack.push_back(vchHash);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OP_CODESEPARATOR:
|
case OP_CODESEPARATOR:
|
||||||
{
|
{
|
||||||
|
@ -170,11 +170,11 @@ template<typename X> const X& ReadWriteAsHelper(const X& x) { return x; }
|
|||||||
#define READWRITEMANY(...) (::SerReadWriteMany(s, ser_action, __VA_ARGS__))
|
#define READWRITEMANY(...) (::SerReadWriteMany(s, ser_action, __VA_ARGS__))
|
||||||
#define READWRITEAS(type, obj) (::SerReadWriteMany(s, ser_action, ReadWriteAsHelper<type>(obj)))
|
#define READWRITEAS(type, obj) (::SerReadWriteMany(s, ser_action, ReadWriteAsHelper<type>(obj)))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implement three methods for serializable objects. These are actually wrappers over
|
* Implement three methods for serializable objects. These are actually wrappers over
|
||||||
* "SerializationOp" template, which implements the body of each class' serialization
|
* "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
|
* 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 \
|
#define ADD_SERIALIZE_METHODS \
|
||||||
template<typename Stream> \
|
template<typename Stream> \
|
||||||
@ -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.
|
* 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
|
* Thus, the byte sequence a[] with length len, where all but the last byte
|
||||||
* has bit 128 set, encodes the number:
|
* has bit 128 set, encodes the number:
|
||||||
*
|
*
|
||||||
* (a[len-1] & 0x7F) + sum(i=1..len-1, 128^i*((a[len-i-1] & 0x7F)+1))
|
* (a[len-1] & 0x7F) + sum(i=1..len-1, 128^i*((a[len-i-1] & 0x7F)+1))
|
||||||
*
|
*
|
||||||
* Properties:
|
* Properties:
|
||||||
* * Very small (0-127: 1 byte, 128-16511: 2 bytes, 16512-2113663: 3 bytes)
|
* * Very small (0-127: 1 byte, 128-16511: 2 bytes, 16512-2113663: 3 bytes)
|
||||||
* * Every integer has exactly one encoding
|
* * Every integer has exactly one encoding
|
||||||
* * Encoding does not depend on size of original integer type
|
* * Encoding does not depend on size of original integer type
|
||||||
* * No redundancy: every (infinite) byte sequence corresponds to a list
|
* * No redundancy: every (infinite) byte sequence corresponds to a list
|
||||||
* of encoded integers.
|
* of encoded integers.
|
||||||
*
|
*
|
||||||
* 0: [0x00] 256: [0x81 0x00]
|
* 0: [0x00] 256: [0x81 0x00]
|
||||||
* 1: [0x01] 16383: [0xFE 0x7F]
|
* 1: [0x01] 16383: [0xFE 0x7F]
|
||||||
* 127: [0x7F] 16384: [0xFF 0x00]
|
* 127: [0x7F] 16384: [0xFF 0x00]
|
||||||
|
@ -580,7 +580,7 @@ private:
|
|||||||
const int nType;
|
const int nType;
|
||||||
const int nVersion;
|
const int nVersion;
|
||||||
|
|
||||||
FILE* file;
|
FILE* file;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CAutoFile(FILE* filenew, int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn)
|
CAutoFile(FILE* filenew, int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn)
|
||||||
|
@ -43,11 +43,11 @@ unit tests as possible).
|
|||||||
The build system is setup to compile an executable called `test_dash`
|
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
|
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
|
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
|
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
|
one test file for each class or source file for which you want to create
|
||||||
unit tests. The file naming convention is `<source_filename>_tests.cpp`
|
unit tests. The file naming convention is `<source_filename>_tests.cpp`
|
||||||
and such files should wrap their tests in a test suite
|
and such files should wrap their tests in a test suite
|
||||||
called `<source_filename>_tests`. For an example of this pattern,
|
called `<source_filename>_tests`. For an example of this pattern,
|
||||||
examine `uint256_tests.cpp`.
|
examine `uint256_tests.cpp`.
|
||||||
|
|
||||||
For further reading, I found the following website to be helpful in
|
For further reading, I found the following website to be helpful in
|
||||||
|
@ -1,151 +1,151 @@
|
|||||||
[
|
[
|
||||||
[
|
[
|
||||||
""
|
""
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"x"
|
"x"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"8212abd8rrzcJmBG9n7VmSpaMfPRXhyHkQtNXFAMPCUqQTF9Kmsk5VF3b81x1qt9tRsQ2REKQ6j"
|
"8212abd8rrzcJmBG9n7VmSpaMfPRXhyHkQtNXFAMPCUqQTF9Kmsk5VF3b81x1qt9tRsQ2REKQ6j"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"5CPYCiRk7LjiYQc45GQTgqNjYw5tWeCZd1NWvevf6SQfJvDm9vK"
|
"5CPYCiRk7LjiYQc45GQTgqNjYw5tWeCZd1NWvevf6SQfJvDm9vK"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"2UB8YkLAsoJWEsw6daxKvo5W4NVjLSB8Bsko6UCWMrLnoFKgETXdKa2XcvoWdjeeLbKqRcaWwGvq"
|
"2UB8YkLAsoJWEsw6daxKvo5W4NVjLSB8Bsko6UCWMrLnoFKgETXdKa2XcvoWdjeeLbKqRcaWwGvq"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"9sW9vnbLHfdcqhU2n5bLAFUksSgCiMBVmdn6Pae3iTYo49aSqZeS"
|
"9sW9vnbLHfdcqhU2n5bLAFUksSgCiMBVmdn6Pae3iTYo49aSqZeS"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"2FeLT8g7q25cvVmUjQnXvTt7rpWDtRjq2oi9F9zj3rLWxNKSoKcPLob6TEB2RAeumauRzj5Em5uL"
|
"2FeLT8g7q25cvVmUjQnXvTt7rpWDtRjq2oi9F9zj3rLWxNKSoKcPLob6TEB2RAeumauRzj5Em5uL"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"7Vbg3REusN6tagLwHkz4P71VZtp8oTTtETmaTFJfypdX4J7vBmp6CMzWpNV3RUdv7TST2nigUz2oU"
|
"7Vbg3REusN6tagLwHkz4P71VZtp8oTTtETmaTFJfypdX4J7vBmp6CMzWpNV3RUdv7TST2nigUz2oU"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"7obK6DhucEuvCinKLAUNYMPXNEFCHcErXa61wi2sMi66owinM4E8YD4rkgHVvxpv3ZGxFNXUyCA"
|
"7obK6DhucEuvCinKLAUNYMPXNEFCHcErXa61wi2sMi66owinM4E8YD4rkgHVvxpv3ZGxFNXUyCA"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"3FPe28dxJDhEmkAbGVgsT5XFpBwyM48FK4veyiQVgAKvQLTea2U"
|
"3FPe28dxJDhEmkAbGVgsT5XFpBwyM48FK4veyiQVgAKvQLTea2U"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"2ULU3PB7u3rxfUXKVb5mZ4ijXbj85LN99s7zess5XPZEX1DJvanHoY6dLvYnkLtQDWQ2qCq1GWSA"
|
"2ULU3PB7u3rxfUXKVb5mZ4ijXbj85LN99s7zess5XPZEX1DJvanHoY6dLvYnkLtQDWQ2qCq1GWSA"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"7VBmPmJMUFwYhgktivvqBZcPzqdKPy4S4RRTACdwTiV6wNpkpXEmp3tvDhzkqdyFhXdJ88Q5T9mka"
|
"7VBmPmJMUFwYhgktivvqBZcPzqdKPy4S4RRTACdwTiV6wNpkpXEmp3tvDhzkqdyFhXdJ88Q5T9mka"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"2Zx1G5CMrEC4Y8EBVxvepmM1aiXv7CenqUR1dZBxC4PFUv9jAAm8TUxD4SKC2ArwKawA3Y4rhC2v"
|
"2Zx1G5CMrEC4Y8EBVxvepmM1aiXv7CenqUR1dZBxC4PFUv9jAAm8TUxD4SKC2ArwKawA3Y4rhC2v"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"yaWZmeqWr5Mea62ECoMPzVkXxHGDF6LtCfc"
|
"yaWZmeqWr5Mea62ECoMPzVkXxHGDF6LtCfc"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"7VPs36WGcbdFsCBsMXExgBoMeme8T7eJ4g3UMqQrhrA2Lyys5vi3dgH43nbz1AV4YFz3ZRKLdFsnu"
|
"7VPs36WGcbdFsCBsMXExgBoMeme8T7eJ4g3UMqQrhrA2Lyys5vi3dgH43nbz1AV4YFz3ZRKLdFsnu"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"2DS5LTr3AgrTGoBD3nqXWDPtCMd98mkop4wxaVfRWwPFYvmpXP5hG5bKzVVzvsKzP89THiiRd3Pr"
|
"2DS5LTr3AgrTGoBD3nqXWDPtCMd98mkop4wxaVfRWwPFYvmpXP5hG5bKzVVzvsKzP89THiiRd3Pr"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"DeRXybcZve86XXanvmLG9XwFadEh8GjH2Y"
|
"DeRXybcZve86XXanvmLG9XwFadEh8GjH2Y"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"7pejnWw1qHjCfAmzXoStxFZYMJ6hu1gixoJD8irtyrki5A9PHDWV798YMaH3teBadyatmdV2YvT"
|
"7pejnWw1qHjCfAmzXoStxFZYMJ6hu1gixoJD8irtyrki5A9PHDWV798YMaH3teBadyatmdV2YvT"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"4Yi2yBokcAj6acLZhiNwmmA1DSzuKnz8vfJ1FHE2yJLSTab6FUi"
|
"4Yi2yBokcAj6acLZhiNwmmA1DSzuKnz8vfJ1FHE2yJLSTab6FUi"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"2U65F6JTxDP2YJ5XV6FiYxpWMCjwCRbEN9ygEXZ3KkbLUMjSbvKbPyCMLf6ke9kMPg9CLQcJ7aN9"
|
"2U65F6JTxDP2YJ5XV6FiYxpWMCjwCRbEN9ygEXZ3KkbLUMjSbvKbPyCMLf6ke9kMPg9CLQcJ7aN9"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"7UgNNEAfdinxDG38ByGmVwbRJp7b4q8BEznm2GXbSJFVSTyS3jiByNLU8ckDprYkqvi5bcf61SUkw"
|
"7UgNNEAfdinxDG38ByGmVwbRJp7b4q8BEznm2GXbSJFVSTyS3jiByNLU8ckDprYkqvi5bcf61SUkw"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"6wzMif8TRzrnyQYAbRZShWcZo3dqKYkBVpi2JR15DFMCLzxAkVTUpsuwdTUWnkx9j1kGDyukh1Go"
|
"6wzMif8TRzrnyQYAbRZShWcZo3dqKYkBVpi2JR15DFMCLzxAkVTUpsuwdTUWnkx9j1kGDyukh1Go"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"6YKZfgYJSh9ivzFX1oNqTiiWwhCGrZbnDCigU6N5oyiBeVUKio5ww3Zu4N6K6NHsqaR8djSh9dLfX"
|
"6YKZfgYJSh9ivzFX1oNqTiiWwhCGrZbnDCigU6N5oyiBeVUKio5ww3Zu4N6K6NHsqaR8djSh9dLfX"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"92sWK7QesAPWS12srisHmc9q8Fz8Z5ERJcAaVwkjVKENJmL45bBM"
|
"92sWK7QesAPWS12srisHmc9q8Fz8Z5ERJcAaVwkjVKENJmL45bBM"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"2Ua8heeYCTTsr5qgi7vorTpDAWVRGRAJKZ7"
|
"2Ua8heeYCTTsr5qgi7vorTpDAWVRGRAJKZ7"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"2A6BvvmZ86GG7TRwXyCaCvhiM5FsVFvs42x"
|
"2A6BvvmZ86GG7TRwXyCaCvhiM5FsVFvs42x"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"R5uiBq2rzVGhxDsq3MeGU3QKeZz8wLywaB"
|
"R5uiBq2rzVGhxDsq3MeGU3QKeZz8wLywaB"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"279AcBMDWxh5hnfEm5kptwnfn7rEWschhdxkEzLYzEj2K3wSHfEaqV2moec6wP5w3jVy5cFhoVXk"
|
"279AcBMDWxh5hnfEm5kptwnfn7rEWschhdxkEzLYzEj2K3wSHfEaqV2moec6wP5w3jVy5cFhoVXk"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"7VMRsPVwoj7vZATKQGj2yVEX55f2qNKDxNiw7YNJv1zjfFFzyWR1WS67tefp7fV1MpXrUhNh86e8Y"
|
"7VMRsPVwoj7vZATKQGj2yVEX55f2qNKDxNiw7YNJv1zjfFFzyWR1WS67tefp7fV1MpXrUhNh86e8Y"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"2V95nNKY2YtDuxyQ6K4unrkKQTmhRpVcUiXdYKxfJSrQG22tHmNojaXc5gUy1ZY6cAByCBMZZsas"
|
"2V95nNKY2YtDuxyQ6K4unrkKQTmhRpVcUiXdYKxfJSrQG22tHmNojaXc5gUy1ZY6cAByCBMZZsas"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"2D79xmaAZxTf2fMRsTGgkNfMrUErj5CqXNY"
|
"2D79xmaAZxTf2fMRsTGgkNfMrUErj5CqXNY"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"7nwQ595A7nXdySFQ2pHx71xJsVLhJAeoj68MSSDHhPMxhBQDynYa5KDXEfhW8jZdZeAkraFMy7b"
|
"7nwQ595A7nXdySFQ2pHx71xJsVLhJAeoj68MSSDHhPMxhBQDynYa5KDXEfhW8jZdZeAkraFMy7b"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"7rLMRn8VSmsGV1QUfZf5xro5gejEST4fuXpokKSvqPPX8wmMabe"
|
"7rLMRn8VSmsGV1QUfZf5xro5gejEST4fuXpokKSvqPPX8wmMabe"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"J3JtSQiZ46yXNEXpuzjmA7R366BBKMD7id5PZ7cX3V5K5DcP3M9L"
|
"J3JtSQiZ46yXNEXpuzjmA7R366BBKMD7id5PZ7cX3V5K5DcP3M9L"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"21WFTGZEpLyGHqVmb7a5skPDN5oD7ocR7r6t2osiqDQf6Xa84mkh3odE1cbZ2ocTFMZbHSrLXyJr"
|
"21WFTGZEpLyGHqVmb7a5skPDN5oD7ocR7r6t2osiqDQf6Xa84mkh3odE1cbZ2ocTFMZbHSrLXyJr"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"7oShSMyZqoK69tWvUEwLBGWHzZFvuVV5SESa4rBe3TmNzfJXBJBP528XMMMiQxoX7fSAzhF2bYL"
|
"7oShSMyZqoK69tWvUEwLBGWHzZFvuVV5SESa4rBe3TmNzfJXBJBP528XMMMiQxoX7fSAzhF2bYL"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"KqarYQ2A4jimBefL5i1SRpbz8xn3y3P2UX1tafCgf48LXTDrKCcf"
|
"KqarYQ2A4jimBefL5i1SRpbz8xn3y3P2UX1tafCgf48LXTDrKCcf"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"gSzq4StFrs2i8gTZ84pw9x68aPQ3XFe5b3oK669aSd68yfFmxH"
|
"gSzq4StFrs2i8gTZ84pw9x68aPQ3XFe5b3oK669aSd68yfFmxH"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"7UdhV95GSa6CY2XjVYfrqrwwyCScmeksu6TCqcpRSeeMbEmDydSMB4E2CCHFZ4gLoXXB7z1iWsGws"
|
"7UdhV95GSa6CY2XjVYfrqrwwyCScmeksu6TCqcpRSeeMbEmDydSMB4E2CCHFZ4gLoXXB7z1iWsGws"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"2msvzdVt86YVXqkWQBJG136u11REi8cXpn1"
|
"2msvzdVt86YVXqkWQBJG136u11REi8cXpn1"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"ryMiy7TSV4LfnJWeXdvT9sZgiLj6ebNg2ac6eLdSAE1N66u1SHwASam7njVBMLYuzr8ntySNoUT"
|
"ryMiy7TSV4LfnJWeXdvT9sZgiLj6ebNg2ac6eLdSAE1N66u1SHwASam7njVBMLYuzr8ntySNoUT"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"6YnxQpwLv2PWVRw8cf5JVm1HmLP3UrQyyUMufDLzuYRg1vbut9he27XAzmLp7m4WxTz7vsriEwQcX"
|
"6YnxQpwLv2PWVRw8cf5JVm1HmLP3UrQyyUMufDLzuYRg1vbut9he27XAzmLp7m4WxTz7vsriEwQcX"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"92g6icyL3H2XCqLiukqquX15fwBR5kFE744En5cd3X61cpANrjqY"
|
"92g6icyL3H2XCqLiukqquX15fwBR5kFE744En5cd3X61cpANrjqY"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"2XCxe9EpeGVMkfZqFgtAKmU2GNBpwnmukDs"
|
"2XCxe9EpeGVMkfZqFgtAKmU2GNBpwnmukDs"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"6YdrW3VDyE96kBFvKghrZ6fkwVngGgJybFnrFHXfexSorcQPxzbHLqNWTSMZHkrdmeQ2ZsLCnFhe3"
|
"6YdrW3VDyE96kBFvKghrZ6fkwVngGgJybFnrFHXfexSorcQPxzbHLqNWTSMZHkrdmeQ2ZsLCnFhe3"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"PsfkAxuhDQKQCwvuwfiVo1vdcYc4fLLr7oZ98XrMyp7SAsLAyQorF"
|
"PsfkAxuhDQKQCwvuwfiVo1vdcYc4fLLr7oZ98XrMyp7SAsLAyQorF"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"2k2HeazZ1apwsF3VQHHCbooreJ2anjumTTU"
|
"2k2HeazZ1apwsF3VQHHCbooreJ2anjumTTU"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"724Fw3TFoSoXsZK77FC8NfrgN2scVC8pq7SntoNgCY3oosmEZHJLcrZVKiFagFm5TLcbfuhKm8ewM"
|
"724Fw3TFoSoXsZK77FC8NfrgN2scVC8pq7SntoNgCY3oosmEZHJLcrZVKiFagFm5TLcbfuhKm8ewM"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"7VrbcSqCJndcp187BT68T5eLXF3TQaH7vN57nAhNhbCyUjtvuX6rtDJYNLmXhPTSrE5dkWqifSsRG"
|
"7VrbcSqCJndcp187BT68T5eLXF3TQaH7vN57nAhNhbCyUjtvuX6rtDJYNLmXhPTSrE5dkWqifSsRG"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"8SHxzARcUKM6NdLyM4JDSMoSkA99SgZ3zP85JAEaiipxnUXuMBtV7dtx6cN1wP5df4bQ8G6MsMv"
|
"8SHxzARcUKM6NdLyM4JDSMoSkA99SgZ3zP85JAEaiipxnUXuMBtV7dtx6cN1wP5df4bQ8G6MsMv"
|
||||||
]
|
]
|
||||||
|
@ -712,7 +712,7 @@
|
|||||||
["0x17 0x3014020002107777777777777777777777777777777701", "0 CHECKSIG NOT", "", "OK", "Zero-length R is correctly encoded"],
|
["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"],
|
["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"],
|
["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"],
|
["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"],
|
["", "DEPTH", "P2SH,STRICTENC", "EVAL_FALSE", "Test the test: we should have an empty stack after scriptSig evaluation"],
|
||||||
|
@ -20,9 +20,9 @@ bool is_null_key(const std::vector<unsigned char>& key) {
|
|||||||
|
|
||||||
return isnull;
|
return isnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_FIXTURE_TEST_SUITE(dbwrapper_tests, BasicTestingSetup)
|
BOOST_FIXTURE_TEST_SUITE(dbwrapper_tests, BasicTestingSetup)
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(dbwrapper)
|
BOOST_AUTO_TEST_CASE(dbwrapper)
|
||||||
{
|
{
|
||||||
// Perform tests both obfuscated and non-obfuscated.
|
// 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
|
// Now, set up another wrapper that wants to obfuscate the same directory
|
||||||
CDBWrapper odbw(ph, (1 << 10), false, false, true);
|
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.
|
// is readable.
|
||||||
uint256 res2;
|
uint256 res2;
|
||||||
BOOST_CHECK(odbw.Read(key, res2));
|
BOOST_CHECK(odbw.Read(key, res2));
|
||||||
@ -153,13 +153,13 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
|
|||||||
|
|
||||||
uint256 in2 = InsecureRand256();
|
uint256 in2 = InsecureRand256();
|
||||||
uint256 res3;
|
uint256 res3;
|
||||||
|
|
||||||
// Check that we can write successfully
|
// Check that we can write successfully
|
||||||
BOOST_CHECK(odbw.Write(key, in2));
|
BOOST_CHECK(odbw.Write(key, in2));
|
||||||
BOOST_CHECK(odbw.Read(key, res3));
|
BOOST_CHECK(odbw.Read(key, res3));
|
||||||
BOOST_CHECK_EQUAL(res3.ToString(), in2.ToString());
|
BOOST_CHECK_EQUAL(res3.ToString(), in2.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure that we start obfuscating during a reindex.
|
// Ensure that we start obfuscating during a reindex.
|
||||||
BOOST_AUTO_TEST_CASE(existing_data_reindex)
|
BOOST_AUTO_TEST_CASE(existing_data_reindex)
|
||||||
{
|
{
|
||||||
@ -190,7 +190,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex)
|
|||||||
|
|
||||||
uint256 in2 = InsecureRand256();
|
uint256 in2 = InsecureRand256();
|
||||||
uint256 res3;
|
uint256 res3;
|
||||||
|
|
||||||
// Check that we can write successfully
|
// Check that we can write successfully
|
||||||
BOOST_CHECK(odbw.Write(key, in2));
|
BOOST_CHECK(odbw.Write(key, in2));
|
||||||
BOOST_CHECK(odbw.Read(key, res3));
|
BOOST_CHECK(odbw.Read(key, res3));
|
||||||
|
@ -28,7 +28,7 @@ std::string CreateEncodedProposalObject(const UniValue& objJSON)
|
|||||||
|
|
||||||
UniValue outerArray(UniValue::VARR);
|
UniValue outerArray(UniValue::VARR);
|
||||||
outerArray.push_back(innerArray);
|
outerArray.push_back(innerArray);
|
||||||
|
|
||||||
std::string strData = outerArray.write();
|
std::string strData = outerArray.write();
|
||||||
std::string strHex = HexStr(strData);
|
std::string strHex = HexStr(strData);
|
||||||
return strHex;
|
return strHex;
|
||||||
|
@ -50,10 +50,10 @@ BOOST_AUTO_TEST_CASE(limitedmap_test)
|
|||||||
// use the iterator to check for the expected key and value
|
// use the iterator to check for the expected key and value
|
||||||
//BOOST_CHECK(it->first == i);
|
//BOOST_CHECK(it->first == i);
|
||||||
//BOOST_CHECK(it->second == i + 1);
|
//BOOST_CHECK(it->second == i + 1);
|
||||||
|
|
||||||
// use find to check for the value
|
// use find to check for the value
|
||||||
BOOST_CHECK(map.find(i)->second == i + 1);
|
BOOST_CHECK(map.find(i)->second == i + 1);
|
||||||
|
|
||||||
// update and recheck
|
// update and recheck
|
||||||
auto jt = map.find(i);
|
auto jt = map.find(i);
|
||||||
map.update(jt, i + 2);
|
map.update(jt, i + 2);
|
||||||
|
@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE(MempoolRemoveTest)
|
|||||||
poolSize = testPool.size();
|
poolSize = testPool.size();
|
||||||
testPool.removeRecursive(txParent);
|
testPool.removeRecursive(txParent);
|
||||||
BOOST_CHECK_EQUAL(testPool.size(), poolSize - 1);
|
BOOST_CHECK_EQUAL(testPool.size(), poolSize - 1);
|
||||||
|
|
||||||
// Parent, children, grandchildren:
|
// Parent, children, grandchildren:
|
||||||
testPool.addUnchecked(txParent.GetHash(), entry.FromTx(txParent));
|
testPool.addUnchecked(txParent.GetHash(), entry.FromTx(txParent));
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
|
@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE(cnode_simple_test)
|
|||||||
|
|
||||||
in_addr ipv4Addr;
|
in_addr ipv4Addr;
|
||||||
ipv4Addr.s_addr = 0xa0b0c001;
|
ipv4Addr.s_addr = 0xa0b0c001;
|
||||||
|
|
||||||
CAddress addr = CAddress(CService(ipv4Addr, 7777), NODE_NETWORK);
|
CAddress addr = CAddress(CService(ipv4Addr, 7777), NODE_NETWORK);
|
||||||
std::string pszDest;
|
std::string pszDest;
|
||||||
bool fInboundIn = false;
|
bool fInboundIn = false;
|
||||||
|
@ -36,7 +36,7 @@ class prevector_tester {
|
|||||||
{
|
{
|
||||||
local_check(a == b);
|
local_check(a == b);
|
||||||
}
|
}
|
||||||
void local_check(bool b)
|
void local_check(bool b)
|
||||||
{
|
{
|
||||||
passed &= b;
|
passed &= b;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ BOOST_FIXTURE_TEST_SUITE(raii_event_tests, BasicTestingSetup)
|
|||||||
BOOST_AUTO_TEST_CASE(raii_event_creation)
|
BOOST_AUTO_TEST_CASE(raii_event_creation)
|
||||||
{
|
{
|
||||||
event_set_mem_functions(tag_malloc, realloc, tag_free);
|
event_set_mem_functions(tag_malloc, realloc, tag_free);
|
||||||
|
|
||||||
void* base_ptr = nullptr;
|
void* base_ptr = nullptr;
|
||||||
{
|
{
|
||||||
auto base = obtain_event_base();
|
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] == 1);
|
||||||
}
|
}
|
||||||
BOOST_CHECK(tags[base_ptr] == 0);
|
BOOST_CHECK(tags[base_ptr] == 0);
|
||||||
|
|
||||||
void* event_ptr = nullptr;
|
void* event_ptr = nullptr;
|
||||||
{
|
{
|
||||||
auto base = obtain_event_base();
|
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[base_ptr] == 0);
|
||||||
BOOST_CHECK(tags[event_ptr] == 0);
|
BOOST_CHECK(tags[event_ptr] == 0);
|
||||||
|
|
||||||
event_set_mem_functions(malloc, realloc, free);
|
event_set_mem_functions(malloc, realloc, free);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(raii_event_order)
|
BOOST_AUTO_TEST_CASE(raii_event_order)
|
||||||
{
|
{
|
||||||
event_set_mem_functions(tag_malloc, realloc, tag_free);
|
event_set_mem_functions(tag_malloc, realloc, tag_free);
|
||||||
|
|
||||||
void* base_ptr = nullptr;
|
void* base_ptr = nullptr;
|
||||||
void* event_ptr = nullptr;
|
void* event_ptr = nullptr;
|
||||||
{
|
{
|
||||||
|
@ -439,7 +439,7 @@ BOOST_AUTO_TEST_CASE(script_build)
|
|||||||
tests.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0C) << OP_CHECKSIG,
|
tests.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0C) << OP_CHECKSIG,
|
||||||
"P2SH(P2PK), bad redeemscript", SCRIPT_VERIFY_P2SH, true
|
"P2SH(P2PK), bad redeemscript", SCRIPT_VERIFY_P2SH, true
|
||||||
).PushSig(keys.key0).PushRedeem().DamagePush(10).ScriptError(SCRIPT_ERR_EVAL_FALSE));
|
).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,
|
tests.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << ToByteVector(keys.pubkey0.GetID()) << OP_EQUALVERIFY << OP_CHECKSIG,
|
||||||
"P2SH(P2PKH)", SCRIPT_VERIFY_P2SH, true
|
"P2SH(P2PKH)", SCRIPT_VERIFY_P2SH, true
|
||||||
).PushSig(keys.key0).Push(keys.pubkey0).PushRedeem());
|
).PushSig(keys.key0).Push(keys.pubkey0).PushRedeem());
|
||||||
|
@ -248,8 +248,8 @@ static bool isCanonicalException(const std::ios_base::failure& ex)
|
|||||||
|
|
||||||
// The string returned by what() can be different for different platforms.
|
// The string returned by what() can be different for different platforms.
|
||||||
// Instead of directly comparing the ex.what() with an expected string,
|
// Instead of directly comparing the ex.what() with an expected string,
|
||||||
// create an instance of exception to see if ex.what() matches
|
// create an instance of exception to see if ex.what() matches
|
||||||
// the expected explanatory string returned by the exception instance.
|
// the expected explanatory string returned by the exception instance.
|
||||||
return strcmp(expectedException.what(), ex.what()) == 0;
|
return strcmp(expectedException.what(), ex.what()) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,19 +156,19 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
|
|||||||
CDataStream ds(in, 0, 0);
|
CDataStream ds(in, 0, 0);
|
||||||
|
|
||||||
// Degenerate case
|
// Degenerate case
|
||||||
|
|
||||||
key.push_back('\x00');
|
key.push_back('\x00');
|
||||||
key.push_back('\x00');
|
key.push_back('\x00');
|
||||||
ds.Xor(key);
|
ds.Xor(key);
|
||||||
BOOST_CHECK_EQUAL(
|
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()));
|
std::string(ds.begin(), ds.end()));
|
||||||
|
|
||||||
in.push_back('\x0f');
|
in.push_back('\x0f');
|
||||||
in.push_back('\xf0');
|
in.push_back('\xf0');
|
||||||
expected_xor.push_back('\xf0');
|
expected_xor.push_back('\xf0');
|
||||||
expected_xor.push_back('\x0f');
|
expected_xor.push_back('\x0f');
|
||||||
|
|
||||||
// Single character key
|
// Single character key
|
||||||
|
|
||||||
ds.clear();
|
ds.clear();
|
||||||
@ -178,9 +178,9 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
|
|||||||
key.push_back('\xff');
|
key.push_back('\xff');
|
||||||
ds.Xor(key);
|
ds.Xor(key);
|
||||||
BOOST_CHECK_EQUAL(
|
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()));
|
std::string(ds.begin(), ds.end()));
|
||||||
|
|
||||||
// Multi character key
|
// Multi character key
|
||||||
|
|
||||||
in.clear();
|
in.clear();
|
||||||
@ -189,7 +189,7 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
|
|||||||
in.push_back('\x0f');
|
in.push_back('\x0f');
|
||||||
expected_xor.push_back('\x0f');
|
expected_xor.push_back('\x0f');
|
||||||
expected_xor.push_back('\x00');
|
expected_xor.push_back('\x00');
|
||||||
|
|
||||||
ds.clear();
|
ds.clear();
|
||||||
ds.insert(ds.begin(), in.begin(), in.end());
|
ds.insert(ds.begin(), in.begin(), in.end());
|
||||||
|
|
||||||
@ -199,8 +199,8 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
|
|||||||
|
|
||||||
ds.Xor(key);
|
ds.Xor(key);
|
||||||
BOOST_CHECK_EQUAL(
|
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()));
|
std::string(ds.begin(), ds.end()));
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE_END()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
@ -14,7 +14,7 @@ static const int64_t DEFAULT_MAX_TIME_ADJUSTMENT = 70 * 60;
|
|||||||
|
|
||||||
class CNetAddr;
|
class CNetAddr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Median filter over a stream of values.
|
* Median filter over a stream of values.
|
||||||
* Returns the median of the last N numbers
|
* Returns the median of the last N numbers
|
||||||
*/
|
*/
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ void CTxMemPool::UpdateForRemoveFromMempool(const setEntries &entriesToRemove, b
|
|||||||
// should be a bit faster.
|
// should be a bit faster.
|
||||||
// However, if we happen to be in the middle of processing a reorg, then
|
// 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
|
// 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
|
// ancestors whose packages include this transaction, because when we
|
||||||
// add a new transaction to the mempool in addUnchecked(), we assume it
|
// 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
|
// has no children, and in the case of a reorg where that assumption is
|
||||||
|
@ -729,7 +729,7 @@ private:
|
|||||||
void removeUnchecked(txiter entry, MemPoolRemovalReason reason = MemPoolRemovalReason::UNKNOWN) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
void removeUnchecked(txiter entry, MemPoolRemovalReason reason = MemPoolRemovalReason::UNKNOWN) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CCoinsView that brings transactions from a mempool into view.
|
* CCoinsView that brings transactions from a mempool into view.
|
||||||
* It does not check for spendings by memory pool transactions.
|
* It does not check for spendings by memory pool transactions.
|
||||||
* Instead, it provides access to all Coins which are either unspent in the
|
* Instead, it provides access to all Coins which are either unspent in the
|
||||||
|
@ -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.
|
// 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;
|
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
|
* 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
|
* block is made active. Note that it does not, however, guarantee that the
|
||||||
* specific block passed to it has been checked for validity!
|
* 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
|
* 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
|
class CScriptCheck
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ etc.
|
|||||||
|
|
||||||
There are currently two sets of tests in this directory:
|
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
|
dashd and dash-qt by interacting with them through the RPC and P2P
|
||||||
interfaces.
|
interfaces.
|
||||||
- [util](/test/util) which tests the dash utilities, currently only
|
- [util](/test/util) which tests the dash utilities, currently only
|
||||||
@ -188,5 +188,5 @@ Use the `-v` option for verbose output.
|
|||||||
# Writing functional tests
|
# Writing functional tests
|
||||||
|
|
||||||
You are encouraged to write functional tests for new or existing features.
|
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).
|
tests is found in [test/functional](/test/functional).
|
||||||
|
@ -67,7 +67,7 @@ class BIP68Test(BitcoinTestFramework):
|
|||||||
# If sequence locks were used, this would require 1 block for the
|
# If sequence locks were used, this would require 1 block for the
|
||||||
# input to mature.
|
# input to mature.
|
||||||
sequence_value = SEQUENCE_LOCKTIME_DISABLE_FLAG | 1
|
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.vout = [CTxOut(value, CScript([b'a']))]
|
||||||
|
|
||||||
tx1_signed = self.nodes[0].signrawtransaction(ToHex(tx1))["hex"]
|
tx1_signed = self.nodes[0].signrawtransaction(ToHex(tx1))["hex"]
|
||||||
|
@ -104,7 +104,7 @@ class MaxUploadTest(BitcoinTestFramework):
|
|||||||
assert_equal(p2p_conns[0].block_receive_map[big_old_block], i+1)
|
assert_equal(p2p_conns[0].block_receive_map[big_old_block], i+1)
|
||||||
|
|
||||||
assert_equal(len(self.nodes[0].getpeerinfo()), 3)
|
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).
|
# the test has been running so far).
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
p2p_conns[0].send_message(getdata_request)
|
p2p_conns[0].send_message(getdata_request)
|
||||||
|
@ -12,8 +12,8 @@ feature_multikeysporks.py
|
|||||||
|
|
||||||
Test logic for several signer keys usage for spork broadcast.
|
Test logic for several signer keys usage for spork broadcast.
|
||||||
|
|
||||||
We set 5 possible keys for sporks signing and set minimum
|
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
|
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
|
value, any 3 signers can change spork value and other 3 signers
|
||||||
can change it again.
|
can change it again.
|
||||||
'''
|
'''
|
||||||
|
@ -79,9 +79,9 @@ class ProxyTest(BitcoinTestFramework):
|
|||||||
# Note: proxies are not used to connect to local nodes
|
# 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
|
# this is because the proxy to use is based on CService.GetNetwork(), which return NET_UNROUTABLE for localhost
|
||||||
args = [
|
args = [
|
||||||
['-listen', '-proxy=%s:%i' % (self.conf1.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.conf1.addr),'-onion=%s:%i' % (self.conf2.addr),'-proxyrandomize=0'],
|
||||||
['-listen', '-proxy=%s:%i' % (self.conf2.addr),'-proxyrandomize=1'],
|
['-listen', '-proxy=%s:%i' % (self.conf2.addr),'-proxyrandomize=1'],
|
||||||
[]
|
[]
|
||||||
]
|
]
|
||||||
if self.have_ipv6:
|
if self.have_ipv6:
|
||||||
|
@ -42,7 +42,7 @@ def serialize_script_num(value):
|
|||||||
# otherwise an anyone-can-spend output.
|
# otherwise an anyone-can-spend output.
|
||||||
def create_coinbase(height, pubkey = None, dip4_activated=False):
|
def create_coinbase(height, pubkey = None, dip4_activated=False):
|
||||||
coinbase = CTransaction()
|
coinbase = CTransaction()
|
||||||
coinbase.vin.append(CTxIn(COutPoint(0, 0xffffffff),
|
coinbase.vin.append(CTxIn(COutPoint(0, 0xffffffff),
|
||||||
ser_string(serialize_script_num(height)), 0xffffffff))
|
ser_string(serialize_script_num(height)), 0xffffffff))
|
||||||
coinbaseoutput = CTxOut()
|
coinbaseoutput = CTxOut()
|
||||||
coinbaseoutput.nValue = 500 * COIN
|
coinbaseoutput.nValue = 500 * COIN
|
||||||
|
@ -45,11 +45,11 @@ class TxnMallTest(BitcoinTestFramework):
|
|||||||
# Coins are sent to node1_address
|
# Coins are sent to node1_address
|
||||||
node1_address = self.nodes[1].getnewaddress("from0")
|
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)
|
txid1 = self.nodes[0].sendfrom("foo", node1_address, 400, 0)
|
||||||
txid2 = self.nodes[0].sendfrom("bar", node1_address, 200, 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)
|
rawtx1 = self.nodes[0].getrawtransaction(txid1,1)
|
||||||
clone_inputs = [{"txid":rawtx1["vin"][0]["txid"],"vout":rawtx1["vin"][0]["vout"]}]
|
clone_inputs = [{"txid":rawtx1["vin"][0]["txid"],"vout":rawtx1["vin"][0]["vout"]}]
|
||||||
clone_outputs = {rawtx1["vout"][0]["scriptPubKey"]["addresses"][0]:rawtx1["vout"][0]["value"],
|
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,
|
# Check node0's total balance; should be same as before the clone, + 1000 DASH for 2 matured,
|
||||||
# less possible orphaned matured subsidy
|
# less possible orphaned matured subsidy
|
||||||
expected += 1000
|
expected += 1000
|
||||||
if (self.options.mine_block):
|
if (self.options.mine_block):
|
||||||
expected -= 500
|
expected -= 500
|
||||||
assert_equal(self.nodes[0].getbalance(), expected)
|
assert_equal(self.nodes[0].getbalance(), expected)
|
||||||
assert_equal(self.nodes[0].getbalance("*", 0), expected)
|
assert_equal(self.nodes[0].getbalance("*", 0), expected)
|
||||||
|
Loading…
Reference in New Issue
Block a user