try again
This commit is contained in:
@@ -1045,7 +1045,6 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state,
|
||||
}
|
||||
}
|
||||
extern char NOTARYADDRS[18][64];
|
||||
bool pubkey2addr(char *destaddr,uint8_t *pubkey33);
|
||||
|
||||
int32_t komodo_isnotaryvout(char *coinaddr) // from ac_private chains only
|
||||
{
|
||||
@@ -1069,11 +1068,6 @@ int32_t komodo_isnotaryvout(char *coinaddr) // from ac_private chains only
|
||||
return(0);
|
||||
}
|
||||
|
||||
int32_t pubkey2address(char *destaddr,uint8_t *pubkey33)
|
||||
{
|
||||
pubkey2addr((char *)destaddr,(uint8_t *)pubkey33);
|
||||
}
|
||||
|
||||
bool CheckTransactionWithoutProofVerification(const CTransaction& tx, CValidationState &state)
|
||||
{
|
||||
// Basic checks that don't depend on any context
|
||||
|
||||
@@ -492,11 +492,24 @@ int32_t gettxout_scriptPubKey(uint8_t *scriptPubKey,int32_t maxsize,uint256 txid
|
||||
return(-1);
|
||||
}
|
||||
|
||||
bool pubkey2addr(char *destaddr,uint8_t *pubkey33);
|
||||
|
||||
int32_t pubkey2address(char *destaddr,uint8_t *pubkey33)
|
||||
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey)
|
||||
{
|
||||
pubkey2addr((char *)destaddr,(uint8_t *)pubkey33);
|
||||
CTxDestination address; txnouttype whichType;
|
||||
if ( ExtractDestination(scriptPubKey,address) != 0 )
|
||||
{
|
||||
strcpy(destaddr,(char *)CBitcoinAddress(address).ToString().c_str());
|
||||
return(true);
|
||||
}
|
||||
fprintf(stderr,"ExtractDestination failed\n");
|
||||
return(false);
|
||||
}
|
||||
|
||||
bool pubkey2address(char *destaddr,uint8_t *pubkey33)
|
||||
{
|
||||
std::vector<uint8_t>pk; int32_t i;
|
||||
for (i=0; i<33; i++)
|
||||
pk.push_back(pubkey33[i]);
|
||||
return(Getscriptaddress(destaddr,CScript() << pk << OP_CHECKSIG));
|
||||
}
|
||||
|
||||
UniValue gettxoutproof(const UniValue& params, bool fHelp)
|
||||
|
||||
@@ -287,6 +287,9 @@ extern UniValue FSMlist(const UniValue& params, bool fHelp);
|
||||
extern UniValue FSMinfo(const UniValue& params, bool fHelp);
|
||||
extern UniValue auctionaddress(const UniValue& params, bool fHelp);
|
||||
|
||||
extern bool pubkey2address(char *destaddr,uint8_t *pubkey33);
|
||||
extern bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey);
|
||||
|
||||
extern UniValue getnewaddress(const UniValue& params, bool fHelp); // in rpcwallet.cpp
|
||||
//extern UniValue getnewaddress64(const UniValue& params, bool fHelp); // in rpcwallet.cpp
|
||||
extern UniValue getaccountaddress(const UniValue& params, bool fHelp);
|
||||
|
||||
Reference in New Issue
Block a user