main: start of address index

Adds a configuration option for addressindex to search for txids by address. Includes
an additional rpc method for getting the txids for an address.
This commit is contained in:
Braydon Fuller
2016-03-05 16:31:10 -05:00
committed by Braydon Fuller
parent 075b416f56
commit 9babc7ff9f
10 changed files with 192 additions and 0 deletions

View File

@@ -201,6 +201,17 @@ unsigned int CScript::GetSigOpCount(const CScript& scriptSig) const
return subscript.GetSigOpCount(true);
}
bool CScript::IsPayToPublicKeyHash() const
{
// Extra-fast test for pay-to-pubkey-hash CScripts:
return (this->size() == 25 &&
(*this)[0] == OP_DUP &&
(*this)[1] == OP_HASH160 &&
(*this)[2] == 0x14 &&
(*this)[23] == OP_EQUALVERIFY &&
(*this)[24] == OP_CHECKSIG);
}
bool CScript::IsPayToScriptHash() const
{
// Extra-fast test for pay-to-script-hash CScripts:

View File

@@ -608,6 +608,8 @@ public:
*/
unsigned int GetSigOpCount(const CScript& scriptSig) const;
bool IsPayToPublicKeyHash() const;
bool IsPayToScriptHash() const;
/** Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical). */