|
|
@ -292,8 +292,11 @@ char *stats_JSON(cJSON *argjson,char *remoteaddr,uint16_t port) // from rpc port |
|
|
|
retstr = clonestr("{\"result\":\"success\",\"notify\":\"received\"}"); |
|
|
|
else if ( IAMCLIENT == 0 && strcmp(method,"notified") == 0 ) |
|
|
|
{ |
|
|
|
printf("utxonotify.(%s)\n",jprint(argjson,0)); |
|
|
|
LP_addutxo(amclient,LP_mypeer,LP_mypubsock,jstr(argjson,"coin"),jbits256(argjson,"txid"),jint(argjson,"vout"),j64bits(argjson,"valuesats"),jbits256(argjson,"txid2"),jint(argjson,"vout2"),j64bits(argjson,"valuesats2"),jstr(argjson,"script"),jstr(argjson,"address"),jstr(argjson,"ipaddr"),juint(argjson,"port"),jdouble(argjson,"profit")); |
|
|
|
if ( juint(argjson,"timestamp") > time(NULL)-60 ) |
|
|
|
{ |
|
|
|
printf("utxonotify.(%s)\n",jprint(argjson,0)); |
|
|
|
LP_addutxo(amclient,LP_mypeer,LP_mypubsock,jstr(argjson,"coin"),jbits256(argjson,"txid"),jint(argjson,"vout"),j64bits(argjson,"valuesats"),jbits256(argjson,"txid2"),jint(argjson,"vout2"),j64bits(argjson,"valuesats2"),jstr(argjson,"script"),jstr(argjson,"address"),jstr(argjson,"ipaddr"),juint(argjson,"port"),jdouble(argjson,"profit")); |
|
|
|
} |
|
|
|
retstr = clonestr("{\"result\":\"success\",\"notifyutxo\":\"received\"}"); |
|
|
|
} |
|
|
|
if ( retstr != 0 ) |
|
|
|