From 5780a3575f2968423553717c8b81ee9776fee136 Mon Sep 17 00:00:00 2001
From: jl777 <jameslee777@yahoo.com>
Date: Fri, 2 Dec 2016 04:01:40 -0300
Subject: [PATCH] test

---
 iguana/dpow/dpow_tx.c | 4 ++--
 iguana/iguana_rpc.c   | 2 ++
 iguana/m_notary       | 8 ++++----
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/iguana/dpow/dpow_tx.c b/iguana/dpow/dpow_tx.c
index e2d532117..7e01cd53b 100755
--- a/iguana/dpow/dpow_tx.c
+++ b/iguana/dpow/dpow_tx.c
@@ -412,7 +412,7 @@ void dpow_rawtxsign(struct supernet_info *myinfo,struct dpow_info *dp,struct igu
                             if ( (sobj= jobj(item,"scriptSig")) != 0 && (sigstr= jstr(sobj,"hex")) != 0 && strlen(sigstr) > 32 )
                             {
                                 valid = 0;
-                                if ( dp->ratifying != 0 && j == 0 )
+                                if ( dp->ratifying != 0 && j == 0 && bp->myind == 0 )
                                     valid = 1;
                                 else if ( (pubstr= jstr(vinitem,"scriptPubKey")) != 0 && is_hexstr(pubstr,0) == 66 )
                                 {
@@ -433,7 +433,7 @@ void dpow_rawtxsign(struct supernet_info *myinfo,struct dpow_info *dp,struct igu
                                     dpow_sigsend(myinfo,dp,bp,myind,bestk,bestmask,srchash,src_or_dest != 0 ? DPOW_SIGBTCCHANNEL : DPOW_SIGCHANNEL);
                                     retval = 0;
                                     break;
-                                } else printf("sig didnt match pubkey? (%s)\n",jprint(vinitem,0));
+                                } else printf("sig.%d of %d didnt match pubkey? (%s)\n",j,m,jprint(vinitem,0));
                             } // else printf("notmine.(%s)\n",jprint(item,0));
                         }
                     } else printf("no vin[] (%s)\n",jprint(txobj2,0));
diff --git a/iguana/iguana_rpc.c b/iguana/iguana_rpc.c
index 2eedef58a..bb7161f29 100755
--- a/iguana/iguana_rpc.c
+++ b/iguana/iguana_rpc.c
@@ -857,6 +857,8 @@ char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsiz
                     originstr = &urlstr[i + strlen(fieldstr)];
                     if ( strncmp(originstr,"http://127.0.0.",strlen("http://127.0.0.")) == 0 )
                         originstr = "http://127.0.0.1:";
+                    if ( strncmp(originstr,"file://127.0.0.",strlen("file://127.0.0.")) == 0 )
+                        originstr = "http://127.0.0.1:";
                     if ( strncmp("null",originstr,strlen("null")) != 0 && strncmp("http://localhost:",originstr,strlen("http://localhost:")) != 0 && strncmp("http://127.0.0.1:",originstr,strlen("http://127.0.0.1:")) != 0 && strncmp("http://easydex.supernet.org",originstr,strlen("http://easydex.supernet.org")) != 0 )
                     {
                         printf("remote %s REJECT.(%s)\n",fieldstr,urlstr);
diff --git a/iguana/m_notary b/iguana/m_notary
index 6b0e05d0a..dd0794507 100755
--- a/iguana/m_notary
+++ b/iguana/m_notary
@@ -19,6 +19,8 @@ sleep 3
 tests/addnotarys_7776
 coins/btc_7776
 coins/kmd_7776
+./wp_7776
+
 coins/revs_7776
 coins/supernet_7776
 coins/dex_7776
@@ -31,9 +33,7 @@ coins/crypto_7776
 coins/pangea_7776
 coins/mgw_7776
 
-curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"$myip\"}"
+#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"$myip\"}"
 curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KMD\",\"pubkey\":\"$pubkey\"}"
 
-sleep 7
-./wp_7776
-sleep 3
+sleep 17