aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/script/interpreter.cpp2
-rw-r--r--src/test/sighash_tests.cpp4
-rw-r--r--src/uint256.h2
-rw-r--r--src/wallet/scriptpubkeyman.cpp2
-rw-r--r--src/wallet/wallet.cpp2
5 files changed, 5 insertions, 7 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 7b2457a5e3..50a6192476 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -1375,7 +1375,7 @@ uint256 SignatureHash(const CScript& scriptCode, const T& txTo, unsigned int nIn
if ((nHashType & 0x1f) == SIGHASH_SINGLE) {
if (nIn >= txTo.vout.size()) {
// nOut out of range
- return UINT256_ONE();
+ return uint256::ONE;
}
}
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index c0bb92258b..bc862de78a 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -28,7 +28,7 @@ uint256 static SignatureHashOld(CScript scriptCode, const CTransaction& txTo, un
{
if (nIn >= txTo.vin.size())
{
- return UINT256_ONE();
+ return uint256::ONE;
}
CMutableTransaction txTmp(txTo);
@@ -58,7 +58,7 @@ uint256 static SignatureHashOld(CScript scriptCode, const CTransaction& txTo, un
unsigned int nOut = nIn;
if (nOut >= txTmp.vout.size())
{
- return UINT256_ONE();
+ return uint256::ONE;
}
txTmp.vout.resize(nOut+1);
for (unsigned int i = 0; i < nOut; i++)
diff --git a/src/uint256.h b/src/uint256.h
index 3e245763b3..c55cb31456 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -150,6 +150,4 @@ inline uint256 uint256S(const std::string& str)
return rv;
}
-inline const uint256& UINT256_ONE() { return uint256::ONE; }
-
#endif // BITCOIN_UINT256_H
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp
index 51715462c5..435716e56a 100644
--- a/src/wallet/scriptpubkeyman.cpp
+++ b/src/wallet/scriptpubkeyman.cpp
@@ -655,7 +655,7 @@ std::unique_ptr<CKeyMetadata> LegacyScriptPubKeyMan::GetMetadata(const CTxDestin
uint256 LegacyScriptPubKeyMan::GetID() const
{
- return UINT256_ONE();
+ return uint256::ONE;
}
/**
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 66857dbb39..d7a13644df 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -324,7 +324,7 @@ std::shared_ptr<CWallet> CreateWallet(interfaces::Chain& chain, const std::strin
return wallet;
}
-const uint256 CWalletTx::ABANDON_HASH(UINT256_ONE());
+const uint256 CWalletTx::ABANDON_HASH(uint256::ONE);
/** @defgroup mapWallet
*