From 21932cbbd52982752bbe46ecb83444f00908d6e6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 5 Jul 2019 23:51:31 -1100 Subject: [PATCH] +print --- src/komodo_nSPV_fullnode.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/komodo_nSPV_fullnode.h b/src/komodo_nSPV_fullnode.h index 320bdbd15..a29176255 100644 --- a/src/komodo_nSPV_fullnode.h +++ b/src/komodo_nSPV_fullnode.h @@ -204,13 +204,14 @@ int32_t NSPV_sendrawtransaction(struct NSPV_broadcastresp *ptr,uint8_t *data,int //fprintf(stderr,"rawtx.(%s)\n",rawtx.c_str()); if ( DecodeHexTx(tx,rawtx) != 0 ) { + LOCK(cs_main); ptr->txid = tx.GetHash(); + fprintf(stderr,"addmempool transaction %s\n",ptr->txid.GetHex().c_str()); if ( myAddtomempool(tx) != 0 ) - { - fprintf(stderr,"relay transaction %s\n",ptr->txid.GetHex().c_str()); - RelayTransaction(tx); ptr->retcode = 1; - } else ptr->retcode = 0; + else ptr->retcode = 0; + fprintf(stderr,"relay transaction %s\n",ptr->txid.GetHex().c_str()); + RelayTransaction(tx); } else ptr->retcode = -1; return(sizeof(*ptr)); }