scripted-diff: Replace UINT256_ONE() with uint256::ONE

-BEGIN VERIFY SCRIPT-
sed -i '/inline.* UINT256_ONE() {/,+1d' src/uint256.h
sed -i 's/UINT256_ONE()/uint256::ONE/' $(git grep -l UINT256_ONE)
-END VERIFY SCRIPT-
pull/764/head
Anthony Towns 4 years ago
parent 183f308fff
commit 82cf4641f4

@ -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;
}
}

@ -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++)

@ -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

@ -655,7 +655,7 @@ std::unique_ptr<CKeyMetadata> LegacyScriptPubKeyMan::GetMetadata(const CTxDestin
uint256 LegacyScriptPubKeyMan::GetID() const
{
return UINT256_ONE();
return uint256::ONE;
}
/**

@ -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
*

Loading…
Cancel
Save