From a70c16cbef8f2c9ad1f011b0cf27ed24eb5c38d9 Mon Sep 17 00:00:00 2001
From: blackjok3r <blackjok3r@gmail.com>
Date: Wed, 6 Mar 2019 17:32:06 +0800
Subject: [PATCH] fix

---
 iguana/dpow/dpow_fsm.c | 1 +
 iguana/dpow/dpow_rpc.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c
index 63280871c..17795c325 100755
--- a/iguana/dpow/dpow_fsm.c
+++ b/iguana/dpow/dpow_fsm.c
@@ -629,6 +629,7 @@ void dpow_statemachinestart(void *ptr)
         // get the confirms for desttxid 
         if ( destnotarized == 0 && (dest_confs= dpow_txconfirms(myinfo, bp->destcoin, bp->desttxid, rettx)) != -1 )
         {
+            fprintf(stderr, "rettx.%s\n", rettx);
             if ( desttx[0] == 0 && rettx[0] != 0 )
             {
                 strcpy(rettx,desttx);
diff --git a/iguana/dpow/dpow_rpc.c b/iguana/dpow/dpow_rpc.c
index 274688d6a..5c2c82731 100755
--- a/iguana/dpow/dpow_rpc.c
+++ b/iguana/dpow/dpow_rpc.c
@@ -546,7 +546,7 @@ int32_t dpow_txconfirms(struct supernet_info *myinfo,struct iguana_info *coin,bi
     cJSON *txobj; int32_t confirms = 0, ret = 0;
     if ( (txobj= dpow_gettransaction(myinfo, coin, txid)) != 0 )
     {
-        memcpy(rawtx, jstr(txobj, "hex"), sizeof(jstr(txobj, "hex")+1);
+        memcpy(rawtx, jstr(txobj, "hex"), strlen(jstr(txobj, "hex"))+1);
         if ( (confirms= juint(txobj, "confirmations")) != 0 )
         {
             ret = confirms;