Fix fundingPubKey

This commit is contained in:
jl777
2018-07-31 22:12:04 -11:00
parent d3cc1ec118
commit a1b43551c9

View File

@@ -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;