From dbf4d76ac7f767eab8ba8a214008e12d0c913566 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 5 Jul 2019 23:45:23 -1100 Subject: [PATCH] Syntax --- src/komodo_nSPV_fullnode.h | 2 +- src/komodo_nSPV_superlite.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_nSPV_fullnode.h b/src/komodo_nSPV_fullnode.h index af6c5d3f1..320bdbd15 100644 --- a/src/komodo_nSPV_fullnode.h +++ b/src/komodo_nSPV_fullnode.h @@ -201,7 +201,7 @@ int32_t NSPV_sendrawtransaction(struct NSPV_broadcastresp *ptr,uint8_t *data,int ptr->retcode = 0; rawtx.resize(n*2+1); init_hexbytes_noT((char *)rawtx.data(),data,n); - fprintf(stderr,"rawtx.(%s)\n",rawtx.c_str()); + //fprintf(stderr,"rawtx.(%s)\n",rawtx.c_str()); if ( DecodeHexTx(tx,rawtx) != 0 ) { ptr->txid = tx.GetHash(); diff --git a/src/komodo_nSPV_superlite.h b/src/komodo_nSPV_superlite.h index d5dd7e269..bea83c38c 100644 --- a/src/komodo_nSPV_superlite.h +++ b/src/komodo_nSPV_superlite.h @@ -378,10 +378,10 @@ UniValue NSPV_broadcast(char *hex) uint8_t *msg,*data; bits256 _txid; uint256 txid; uint16_t n; int32_t i,len = 0; struct NSPV_broadcastresp B; n = (int32_t)strlen(hex) >> 1; data = (uint8_t *)malloc(n); - decode_hex(tx,n,hex); + decode_hex(data,n,hex); _txid = bits256_doublesha256(0,data,n); memcpy(&txid,&_txid,sizeof(txid)); - msg = malloc(1 + sizeof(txid) + sizeof(n) + n); + msg = (uint8_t *)malloc(1 + sizeof(txid) + sizeof(n) + n); msg[len++] = NSPV_BROADCAST; len += iguana_rwbignum(1,&msg[len],sizeof(txid),(uint8_t *)&txid); len += iguana_rwnum(1,&msg[len],sizeof(n),&n);