Added CCaddr1of2set and FinalizeCCtx modified to support it

(small test CCerror code added - temp)
This commit is contained in:
dimxy
2019-01-07 23:21:57 +05:00
parent 8e8a94404f
commit be71d108b2
6 changed files with 100 additions and 42 deletions

View File

@@ -195,6 +195,14 @@ void CCaddr3set(struct CCcontract_info *cp,uint8_t evalcode,CPubKey pk,uint8_t *
strcpy(cp->unspendableaddr3,coinaddr);
}
// set pubkeys, myprivkey and 1of2 cc addr for spending from 1of2 cryptocondition vout:
void CCaddr1of2set(struct CCcontract_info *cp, CPubKey pk1, CPubKey pk2, char *coinaddr)
{
cp->unspendable1of2pk[0] = pk1;
cp->unspendable1of2pk[1] = pk2;
strcpy(cp->unspendable1of2addr, coinaddr);
}
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey)
{
CTxDestination address; txnouttype whichType;