dealer0_fundingtxid
This commit is contained in:
@@ -419,7 +419,7 @@ void *dicefinish(void *_ptr)
|
||||
utxos = (struct dicefinish_utxo *)calloc(vin0_needed,sizeof(*utxos));
|
||||
if ( (n= dicefinish_utxosget(num,utxos,vin0_needed,coinaddr)) > 0 )
|
||||
{
|
||||
fprintf(stderr,"iter.%d vin0_needed.%d got %d, num 0.0002 %d\n",iter,vin0_needed,n,num);
|
||||
//fprintf(stderr,"iter.%d vin0_needed.%d got %d, num 0.0002 %d\n",iter,vin0_needed,n,num);
|
||||
m = 0;
|
||||
DL_FOREACH_SAFE(DICEFINISH_LIST,ptr,tmp)
|
||||
{
|
||||
@@ -1626,11 +1626,12 @@ std::string DiceBetFinish(uint8_t &funcid,uint256 &entropyused,int32_t &entropyv
|
||||
return("couldnt find bettx or entropytx");
|
||||
}
|
||||
|
||||
static uint256 dealer0_fundingtxid;
|
||||
void *dealer0_loop(void *_arg)
|
||||
{
|
||||
char *planstr = (char *)_arg;
|
||||
CTransaction tx; CPubKey mypk,dicepk; uint64_t entropyval; uint256 entropytxid,fundingtxid; int32_t entropytxs,i,n,num; CScript fundingPubKey; struct CCcontract_info *cp,C; char coinaddr[64]; std::string res; int64_t minbet,maxbet,maxodds,timeoutblocks; uint64_t refsbits,txfee = 10000;
|
||||
if ( (cp= Diceinit(fundingPubKey,fundingtxid,&C,planstr,txfee,mypk,dicepk,refsbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 )
|
||||
CTransaction tx; CPubKey mypk,dicepk; uint64_t entropyval; uint256 entropytxid; int32_t entropytxs,i,n,num; CScript fundingPubKey; struct CCcontract_info *cp,C; char coinaddr[64]; std::string res; int64_t minbet,maxbet,maxodds,timeoutblocks; uint64_t refsbits,txfee = 10000;
|
||||
if ( (cp= Diceinit(fundingPubKey,dealer0_fundingtxid,&C,planstr,txfee,mypk,dicepk,refsbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 )
|
||||
{
|
||||
fprintf(stderr,"error initializing dealer0_loop\n");
|
||||
exit(-1);
|
||||
@@ -1751,6 +1752,7 @@ double DiceStatus(uint64_t txfee,char *planstr,uint256 fundingtxid,uint256 bettx
|
||||
if ( didinit == 0 && KOMODO_DEALERNODE == 0 && scriptPubKey == fundingPubKey )
|
||||
{
|
||||
strcpy(_planstr,planstr);
|
||||
dealer0_fundingtxid = fundingtxid;
|
||||
if ( pthread_create((pthread_t *)malloc(sizeof(pthread_t)),NULL,dealer0_loop,_planstr) == 0 )
|
||||
didinit = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user