From fa2bb98579a01704f638a7daf3c1f8b02363e3bb Mon Sep 17 00:00:00 2001
From: Robert Martin-Legene <robert@nic.ar>
Date: Fri, 1 Mar 2019 18:45:26 -0300
Subject: [PATCH] Habilitar que start.sh puede arrancar un nodo transaccional
 abierto (opentx)

---
 bin/start.sh | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/bin/start.sh b/bin/start.sh
index 4c33b36..d0aee91 100755
--- a/bin/start.sh
+++ b/bin/start.sh
@@ -57,6 +57,11 @@ function startbootnode
 
 function startmonitor
 {
+    if [ -e "${BFANODEDIR}/opentx" ]
+    then
+        echo "Monitor uses functions which are disabled when running an opentx node, so monitor not started."
+        return
+    fi
     local   ERRTEXT="monitor section failed"
     local   pidfile=${BFANETWORKDIR}/monitor.pid
     (
@@ -109,15 +114,21 @@ function startgeth
             then
                 flexargs="${flexargs} --verbosity ${BFAVERBOSITY:-3}"
             fi
+            if [ -e "${BFANODEDIR}/opentx" ]
+            then
+                # INADDR_ANY
+                flexargs="${flexargs} --rpcapi eth,net,web3,clique --rpcaddr 0.0.0.0 --rpcvhosts localhost,opentx.bfa.ar"
+            else
+                flexargs="${flexargs} --rpcapi eth,net,web3,admin,clique,miner,personal"
+            fi
             set -x
             geth			            \
 	        --datadir ${BFANODEDIR}	            \
 	        --networkid ${BFANETWORKID}         \
 	        --rpc			            \
-	        --rpcapi "eth,net,web3,admin,clique,miner,personal"	\
                 --gcmode archive                    \
-	        --cache 512		            \
 	        ${flexargs}			    \
+                --rpccorsdomain \*                  \
 	        --bootnodes "${bootnodes}"          &
             set +x
             echo $! > ${BFANODEDIR}/geth.pid
-- 
GitLab