Browse Source

Merge pull request #786 from jl777/dev

Dev
patch-6
jl777 7 years ago
committed by GitHub
parent
commit
c81068bde5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      iguana/dpow/dpow_network.c
  2. 14
      iguana/exchanges/LP_signatures.c
  3. 1
      iguana/exchanges/LP_socket.c
  4. 2
      iguana/exchanges/coins

2
iguana/dpow/dpow_network.c

@ -1901,7 +1901,7 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru
printf("mypaxcrc.%x\n",bp->paxwdcrc);
}
char str[65];
if ( (rand() % 130) == 0 || strcmp(dp->symbol,"KMD") == 0 )
if ( (rand() % 130) == 0 )//|| strcmp(dp->symbol,"KMD") == 0 )
printf("%p ht.%d [%d] ips.%d %s NOTARIZE.%d matches.%d paxmatches.%d bestmatches.%d bestk.%d %llx recv.%llx sigmasks.(%llx %llx) senderind.%d state.%x (%x %x %x) MoM.%s [%d]\n",bp,bp->height,bp->myind,dp->numipbits,dp->symbol,bp->minsigs,matches,paxmatches,bestmatches,bp->bestk,(long long)bp->bestmask,(long long)bp->recvmask,(long long)(bp->bestk>=0?bp->destsigsmasks[bp->bestk]:0),(long long)(bp->bestk>=0?bp->srcsigsmasks[bp->bestk]:0),senderind,bp->state,bp->hashmsg.uints[0],bp->desttxid.uints[0],bp->srctxid.uints[0],bits256_str(str,bp->MoM),bp->MoMdepth);
}
}

14
iguana/exchanges/LP_signatures.c

@ -459,7 +459,7 @@ char *LP_pricepings(void *ctx,char *myipaddr,int32_t pubsock,char *base,char *re
char *LP_postprice_recv(cJSON *argjson)
{
bits256 pubkey; double price; char *base,*rel,*argstr;
bits256 pubkey; double price; uint8_t pubkey33[33]; char *base,*rel,*argstr,coinaddr[64];
//printf("PRICE POSTED.(%s)\n",jprint(argjson,0));
if ( (base= jstr(argjson,"base")) != 0 && (rel= jstr(argjson,"rel")) != 0 && (price= jdouble(argjson,"price")) > SMALLVAL )
{
@ -482,7 +482,17 @@ char *LP_postprice_recv(cJSON *argjson)
}
else
{
printf("sig failure.(%s)\n",jprint(argjson,0));
if ( jstr(argjson,"pubsecp") != 0 )
{
static char lasterror[64];
decode_hex(pubkey33,33,jstr(argjson,"pubsecp"));
bitcoin_address("KMD",coinaddr,0,60,pubkey33,33);
if ( strcmp(coinaddr,lasterror) != 0 )
{
printf("sig failure.(%s) %s\n",jprint(argjson,0),coinaddr);
strcpy(lasterror,coinaddr);
}
}
return(clonestr("{\"error\":\"sig failure\"}"));
}
}

1
iguana/exchanges/LP_socket.c

@ -619,6 +619,7 @@ cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON
else if ( G.LP_pendingswaps != 0 && time(NULL) > ap->unspenttime+13 )
usecache = 0;
}
usecache = 0; // disable unspents cache
if ( usecache == 0 || electrumflag > 1 )
{
if ( strcmp(symbol,"BCH") == 0 )

2
iguana/exchanges/coins

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save