Merge branch 'beta' into dev
This commit is contained in:
12
resolve.sh
Executable file
12
resolve.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
for f in $(git diff --name-only --diff-filter=U | cat); do
|
||||
echo "Resolve conflict in $f ..."
|
||||
git checkout --theirs $f
|
||||
done
|
||||
|
||||
for f in $(git diff --name-only --diff-filter=U | cat); do
|
||||
echo "Adding file $f ..."
|
||||
git add $f
|
||||
done
|
||||
|
||||
@@ -869,7 +869,7 @@ std::string DiceCreateFunding(uint64_t txfee,char *planstr,int64_t funds,int64_t
|
||||
memset(&zero,0,sizeof(zero));
|
||||
if ( (cp= Diceinit(fundingPubKey,zero,&C,planstr,txfee,mypk,dicepk,sbits,a,b,c,d)) == 0 )
|
||||
{
|
||||
CCerror = "Diceinit error in create funding";
|
||||
CCerror = "Diceinit error in create funding, is your transaction confirmed?";
|
||||
fprintf(stderr,"%s\n", CCerror.c_str() );
|
||||
return("");
|
||||
}
|
||||
@@ -894,8 +894,10 @@ std::string DiceAddfunding(uint64_t txfee,char *planstr,uint256 fundingtxid,int6
|
||||
fprintf(stderr,"%s\n", CCerror.c_str() );
|
||||
return("");
|
||||
}
|
||||
if ( (cp= Diceinit(fundingPubKey,fundingtxid,&C,planstr,txfee,mypk,dicepk,sbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 )
|
||||
if ( (cp= Diceinit(fundingPubKey,fundingtxid,&C,planstr,txfee,mypk,dicepk,sbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 ) {
|
||||
CCerror = "Diceinit error in add funding, is your transaction confirmed?";
|
||||
return("");
|
||||
}
|
||||
scriptPubKey = CScript() << ParseHex(HexStr(mypk)) << OP_CHECKSIG;
|
||||
if ( 0 )
|
||||
{
|
||||
@@ -943,8 +945,10 @@ std::string DiceBet(uint64_t txfee,char *planstr,uint256 fundingtxid,int64_t bet
|
||||
fprintf(stderr,"%s\n", CCerror.c_str() );
|
||||
return("");
|
||||
}
|
||||
if ( (cp= Diceinit(fundingPubKey,fundingtxid,&C,planstr,txfee,mypk,dicepk,sbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 )
|
||||
if ( (cp= Diceinit(fundingPubKey,fundingtxid,&C,planstr,txfee,mypk,dicepk,sbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 ) {
|
||||
CCerror = "Diceinit error in bet, is your transaction confirmed?";
|
||||
return("");
|
||||
}
|
||||
if ( bet < minbet || bet > maxbet || odds > maxodds )
|
||||
{
|
||||
CCerror = strprintf("Dice plan %s illegal bet %.8f: minbet %.8f maxbet %.8f or odds %d vs max.%d\n",planstr,(double)bet/COIN,(double)minbet/COIN,(double)maxbet/COIN,(int32_t)odds,(int32_t)maxodds);
|
||||
@@ -984,7 +988,7 @@ std::string DiceBetFinish(int32_t *resultp,uint64_t txfee,char *planstr,uint256
|
||||
//char str[65]; fprintf(stderr,"DiceBetFinish.%s %s\n",planstr,uint256_str(str,bettxid));
|
||||
if ( (cp= Diceinit(fundingPubKey,fundingtxid,&C,planstr,txfee,mypk,dicepk,sbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 )
|
||||
{
|
||||
CCerror = "Diceinit error in finish";
|
||||
CCerror = "Diceinit error in finish, is your transaction confirmed?";
|
||||
fprintf(stderr,"%s\n", CCerror.c_str() );
|
||||
return("");
|
||||
}
|
||||
@@ -1097,7 +1101,7 @@ double DiceStatus(uint64_t txfee,char *planstr,uint256 fundingtxid,uint256 bettx
|
||||
CScript fundingPubKey,scriptPubKey; CTransaction spenttx,betTx; uint256 hash,proof,txid,hashBlock,spenttxid; CPubKey mypk,dicepk,fundingpk; struct CCcontract_info *cp,C; int32_t i,result,vout,n=0; int64_t minbet,maxbet,maxodds,timeoutblocks; uint64_t sbits; char coinaddr[64]; std::string res;
|
||||
if ( (cp= Diceinit(fundingPubKey,fundingtxid,&C,planstr,txfee,mypk,dicepk,sbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 )
|
||||
{
|
||||
CCerror = "Diceinit error in status";
|
||||
CCerror = "Diceinit error in status, is your transaction confirmed?";
|
||||
fprintf(stderr,"%s\n", CCerror.c_str() );
|
||||
return(0.);
|
||||
}
|
||||
|
||||
@@ -1705,7 +1705,10 @@ void komodo_args(char *argv0)
|
||||
BITCOIND_RPCPORT = GetArg("-rpcport", ASSETCHAINS_RPCPORT);
|
||||
//fprintf(stderr,"(%s) port.%u chain params initialized\n",ASSETCHAINS_SYMBOL,BITCOIND_RPCPORT);
|
||||
if ( strcmp("PIRATE",ASSETCHAINS_SYMBOL) == 0 && ASSETCHAINS_HALVING == 77777 )
|
||||
{
|
||||
ASSETCHAINS_HALVING *= 5;
|
||||
fprintf(stderr,"PIRATE halving changed to %d %.1f days\n",(int32_t)ASSETCHAINS_HALVING,(double)ASSETCHAINS_HALVING/1440);
|
||||
}
|
||||
} else BITCOIND_RPCPORT = GetArg("-rpcport", BaseParams().RPCPort());
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ extern int32_t KOMODO_LOADINGBLOCKS,KOMODO_LONGESTCHAIN,KOMODO_INSYNC,KOMODO_CON
|
||||
int32_t KOMODO_NEWBLOCKS;
|
||||
int32_t komodo_block2pubkey33(uint8_t *pubkey33,CBlock *block);
|
||||
void komodo_broadcast(CBlock *pblock,int32_t limit);
|
||||
void komodo_broadcast(CBlock *pblock,int32_t limit);
|
||||
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey);
|
||||
|
||||
BlockMap mapBlockIndex;
|
||||
@@ -3403,6 +3404,7 @@ bool static DisconnectTip(CValidationState &state, bool fBare = false) {
|
||||
CBlock block;
|
||||
if (!ReadBlockFromDisk(block, pindexDelete,1))
|
||||
return AbortNode(state, "Failed to read block");
|
||||
//if ( ASSETCHAINS_SYMBOL[0] != 0 || pindexDelete->nHeight > 1400000 )
|
||||
{
|
||||
int32_t prevMoMheight; uint256 notarizedhash,txid;
|
||||
komodo_notarized_height(&prevMoMheight,¬arizedhash,&txid);
|
||||
|
||||
@@ -6050,7 +6050,10 @@ UniValue dicebet(const UniValue& params, bool fHelp)
|
||||
}
|
||||
if (amount > 0 && odds > 0) {
|
||||
hex = DiceBet(0,name,fundingtxid,amount,odds);
|
||||
if ( hex.size() > 0 )
|
||||
if ( CCerror != "" )
|
||||
{
|
||||
ERR_RESULT(CCerror);
|
||||
} else if ( hex.size() > 0 )
|
||||
{
|
||||
result.push_back(Pair("result", "success"));
|
||||
result.push_back(Pair("hex", hex));
|
||||
|
||||
Reference in New Issue
Block a user