aboutsummaryrefslogtreecommitdiff
path: root/src/script.cpp
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2012-04-23 14:14:03 -0400
committerJeff Garzik <jgarzik@redhat.com>2012-04-23 14:14:03 -0400
commit7bd9c3a3cf408175019f85ec33cfd4364e5f5d32 (patch)
tree9e05718e234582ad68ff0561717cbd115ea094d5 /src/script.cpp
parentfaf705a42a05197d89abfc31672ced94d268767f (diff)
downloadbitcoin-7bd9c3a3cf408175019f85ec33cfd4364e5f5d32.tar.xz
SigOp and orphan-tx constants and counts are always unsigned.
Fixes several sign-comparison warnings.
Diffstat (limited to 'src/script.cpp')
-rw-r--r--src/script.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/script.cpp b/src/script.cpp
index 00c9990b8f..eb8200bcc3 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -1360,9 +1360,9 @@ bool IsStandard(const CScript& scriptPubKey)
}
-int HaveKeys(const vector<valtype>& pubkeys, const CKeyStore& keystore)
+unsigned int HaveKeys(const vector<valtype>& pubkeys, const CKeyStore& keystore)
{
- int nResult = 0;
+ unsigned int nResult = 0;
BOOST_FOREACH(const valtype& pubkey, pubkeys)
{
CBitcoinAddress address;
@@ -1566,9 +1566,9 @@ bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsig
return true;
}
-int CScript::GetSigOpCount(bool fAccurate) const
+unsigned int CScript::GetSigOpCount(bool fAccurate) const
{
- int n = 0;
+ unsigned int n = 0;
const_iterator pc = begin();
opcodetype lastOpcode = OP_INVALIDOPCODE;
while (pc < end())
@@ -1590,7 +1590,7 @@ int CScript::GetSigOpCount(bool fAccurate) const
return n;
}
-int CScript::GetSigOpCount(const CScript& scriptSig) const
+unsigned int CScript::GetSigOpCount(const CScript& scriptSig) const
{
if (!IsPayToScriptHash())
return GetSigOpCount(true);