Fix fundingPubKey
This commit is contained in:
@@ -539,7 +539,10 @@ uint64_t DicePlanFunds(uint64_t &entropyval,uint256 &entropytxid,uint64_t refsbi
|
||||
{
|
||||
char coinaddr[64]; uint64_t sbits,nValue,totalinputs = 0; uint256 hash,txid,proof,hashBlock,fundingtxid; CScript fundingPubKey; CTransaction tx,vinTx; int32_t vout,first=0,n=0; uint8_t funcid;
|
||||
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs;
|
||||
fundingPubKey = CScript() << ParseHex(HexStr(dicepk)) << OP_CHECKSIG;
|
||||
if ( GetTransaction(reffundingtxid,tx,hashBlock,false) != 0 && tx.vout.size() > 1 && ConstrainVout(tx.vout[0],1,cp->unspendableCCaddr,0) != 0 )
|
||||
{
|
||||
fundingPubKey = tx.vout[1].scriptPubKey;
|
||||
} else return(0);
|
||||
GetCCaddress(cp,coinaddr,dicepk);
|
||||
SetCCunspents(unspentOutputs,coinaddr);
|
||||
entropyval = 0;
|
||||
|
||||
Reference in New Issue
Block a user