|
|
@ -197,12 +197,11 @@ uint8_t *NSPV_getrawtx(uint256 &hashBlock,uint16_t *txlenp,uint256 txid) |
|
|
|
|
|
|
|
int32_t NSPV_sendrawtransaction(struct NSPV_broadcastresp *ptr,uint8_t *data,int32_t n) |
|
|
|
{ |
|
|
|
CTransaction tx; std::string rawtx; |
|
|
|
CTransaction tx; std::vector<uint8_t> rawdata; |
|
|
|
ptr->retcode = 0; |
|
|
|
rawtx.resize(n*2+1); |
|
|
|
init_hexbytes_noT((char *)rawtx.data(),data,n); |
|
|
|
//fprintf(stderr,"rawtx.(%s)\n",rawtx.c_str());
|
|
|
|
if ( DecodeHexTx(tx,rawtx) != 0 ) |
|
|
|
rawdata.resize(n); |
|
|
|
memcpy(&rawdata[0],data,n); |
|
|
|
if ( DecodeHexTx(tx,rawdata.GetHex()) != 0 ) |
|
|
|
{ |
|
|
|
LOCK(cs_main); |
|
|
|
ptr->txid = tx.GetHash(); |
|
|
@ -494,6 +493,7 @@ 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"); |
|
|
|
if ( NSPV_rwbroadcastresp(1,&response[1],&B) == slen ) |
|
|
|
{ |
|
|
|
pfrom->PushMessage("nSPV",response); |
|
|
|