This commit is contained in:
@@ -374,7 +374,6 @@ int32_t NSPV_rwbroadcastresp(int32_t rwflag,uint8_t *serialized,struct NSPV_broa
|
||||
int32_t len = 0;
|
||||
len += iguana_rwbignum(rwflag,&serialized[len],sizeof(ptr->txid),(uint8_t *)&ptr->txid);
|
||||
len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->retcode),&ptr->retcode);
|
||||
fprintf(stderr,"broadcastresp[%d]\n",len);
|
||||
return(len);
|
||||
}
|
||||
|
||||
|
||||
@@ -205,11 +205,11 @@ int32_t NSPV_sendrawtransaction(struct NSPV_broadcastresp *ptr,uint8_t *data,int
|
||||
{
|
||||
LOCK(cs_main);
|
||||
ptr->txid = tx.GetHash();
|
||||
fprintf(stderr,"addmempool transaction %s\n",ptr->txid.GetHex().c_str());
|
||||
//fprintf(stderr,"addmempool transaction %s\n",ptr->txid.GetHex().c_str());
|
||||
if ( myAddtomempool(tx) != 0 )
|
||||
ptr->retcode = 1;
|
||||
else ptr->retcode = 0;
|
||||
fprintf(stderr,"relay transaction %s retcode.%d\n",ptr->txid.GetHex().c_str(),ptr->retcode);
|
||||
//fprintf(stderr,"relay transaction %s retcode.%d\n",ptr->txid.GetHex().c_str(),ptr->retcode);
|
||||
RelayTransaction(tx);
|
||||
} else ptr->retcode = -1;
|
||||
return(sizeof(*ptr));
|
||||
@@ -493,7 +493,6 @@ void komodo_nSPVreq(CNode *pfrom,std::vector<uint8_t> request) // received a req
|
||||
{
|
||||
response.resize(1 + slen);
|
||||
response[0] = NSPV_BROADCASTRESP;
|
||||
fprintf(stderr,"slen.%d\n",slen);
|
||||
if ( NSPV_rwbroadcastresp(1,&response[1],&B) == slen )
|
||||
{
|
||||
pfrom->PushMessage("nSPV",response);
|
||||
|
||||
@@ -387,6 +387,7 @@ UniValue NSPV_broadcast(char *hex)
|
||||
len += iguana_rwnum(1,&msg[len],sizeof(n),&n);
|
||||
memcpy(&msg[len],data,n), len += n;
|
||||
free(data);
|
||||
fprintf(stderr,"send txid.%s\n",txid.GetHex().c_str());
|
||||
if ( NSPV_req(0,msg,len,NODE_NSPV,msg[0]>>1) != 0 )
|
||||
{
|
||||
for (i=0; i<NSPV_POLLITERS; i++)
|
||||
|
||||
Reference in New Issue
Block a user