@ -1195,7 +1195,7 @@ bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubK
bool Solver ( const CScript & scriptPubKey , txnouttype & typeRet , vector < vector < unsigned char > > & vSolutionsRet )
bool Solver ( const CScript & scriptPubKey , txnouttype & typeRet , vector < vector < unsigned char > > & vSolutionsRet )
{
{
// Templates
// Templates
static map < txnouttype , CScript > mTemplates ;
static multim ap < txnouttype , CScript > mTemplates ;
if ( mTemplates . empty ( ) )
if ( mTemplates . empty ( ) )
{
{
// Standard tx, sender provides pubkey, receiver adds signature
// Standard tx, sender provides pubkey, receiver adds signature
@ -1209,6 +1209,7 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
// Empty, provably prunable, data-carrying output
// Empty, provably prunable, data-carrying output
mTemplates . insert ( make_pair ( TX_NULL_DATA , CScript ( ) < < OP_RETURN < < OP_SMALLDATA ) ) ;
mTemplates . insert ( make_pair ( TX_NULL_DATA , CScript ( ) < < OP_RETURN < < OP_SMALLDATA ) ) ;
mTemplates . insert ( make_pair ( TX_NULL_DATA , CScript ( ) < < OP_RETURN ) ) ;
}
}
// Shortcut for pay-to-script-hash, which are more constrained than the other types:
// Shortcut for pay-to-script-hash, which are more constrained than the other types:
@ -1392,9 +1393,8 @@ int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned c
switch ( t )
switch ( t )
{
{
case TX_NONSTANDARD :
case TX_NONSTANDARD :
return - 1 ;
case TX_NULL_DATA :
case TX_NULL_DATA :
return 1 ;
return - 1 ;
case TX_PUBKEY :
case TX_PUBKEY :
return 1 ;
return 1 ;
case TX_PUBKEYHASH :
case TX_PUBKEYHASH :
@ -1532,8 +1532,10 @@ bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, vecto
vector < valtype > vSolutions ;
vector < valtype > vSolutions ;
if ( ! Solver ( scriptPubKey , typeRet , vSolutions ) )
if ( ! Solver ( scriptPubKey , typeRet , vSolutions ) )
return false ;
return false ;
if ( typeRet = = TX_NULL_DATA )
if ( typeRet = = TX_NULL_DATA ) {
return true ;
// This is data, not addresses
return false ;
}
if ( typeRet = = TX_MULTISIG )
if ( typeRet = = TX_MULTISIG )
{
{