Skip to content
Snippets Groups Projects
Commit e96c4d17 authored by Robert Martin-Legene's avatar Robert Martin-Legene
Browse files

Renamed geth_exec_js to geth_exec_file

parent ef91ac5a
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ EOT ...@@ -35,7 +35,7 @@ EOT
echo '*** Creating contract. This will take at least 16 seconds.' echo '*** Creating contract. This will take at least 16 seconds.'
outfile=$( mktemp ) outfile=$( mktemp )
cleanup "$outfile" cleanup "$outfile"
geth_exec_js $js > $outfile geth_exec_file $js > $outfile
if [ ` wc -l < $outfile ` = 2 -a `tail -1 < $outfile` = "true" ] if [ ` wc -l < $outfile ` = 2 -a `tail -1 < $outfile` = "true" ]
then then
addr=` head -1 < $outfile ` addr=` head -1 < $outfile `
......
...@@ -37,7 +37,7 @@ console.log ( thecontract.put.sendTransaction( "${sum}", {from: eth.accounts[0], ...@@ -37,7 +37,7 @@ console.log ( thecontract.put.sendTransaction( "${sum}", {from: eth.accounts[0],
EOT EOT
out=$( mktemp ) out=$( mktemp )
cleanup "$out" cleanup "$out"
geth_exec_js "${js}" > ${out} geth_exec_file "${js}" > ${out}
if [ ` wc -l < ${out} ` = 2 -a ` tail -1 < ${out} ` = "true" ] if [ ` wc -l < ${out} ` = 2 -a ` tail -1 < ${out} ` = "true" ]
then then
trans=` head -1 < ${out} ` trans=` head -1 < ${out} `
......
...@@ -43,7 +43,7 @@ function geth_attach ...@@ -43,7 +43,7 @@ function geth_attach
$cat | geth --cache 0 "$@" attach ipc:${BFANODEDIR}/geth.ipc $cat | geth --cache 0 "$@" attach ipc:${BFANODEDIR}/geth.ipc
} }
function geth_exec_js function geth_exec_file
{ {
test -r "$1" test -r "$1"
if echo $- | grep -q x && [ -t 1 ] if echo $- | grep -q x && [ -t 1 ]
......
...@@ -5,7 +5,7 @@ if [ -z "${BFAHOME}" ]; then echo "\$BFAHOME not set. Did you source bfa/bin/env ...@@ -5,7 +5,7 @@ if [ -z "${BFAHOME}" ]; then echo "\$BFAHOME not set. Did you source bfa/bin/env
source ${BFAHOME}/bin/libbfa.sh || exit 1 source ${BFAHOME}/bin/libbfa.sh || exit 1
bfaconfig node bfaconfig node
res=$( geth_exec_js "${BFAHOME}/src/js.maymine" ) res=$( geth_exec_file "${BFAHOME}/src/js.maymine" )
if [ "$res" = "true" ] if [ "$res" = "true" ]
then then
......
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
if [ -z "${BFAHOME}" ]; then echo "\$BFAHOME not set. Did you source bfa/bin/env ?" >&2; exit 1; fi if [ -z "${BFAHOME}" ]; then echo "\$BFAHOME not set. Did you source bfa/bin/env ?" >&2; exit 1; fi
source ${BFAHOME}/bin/libbfa.sh || exit 1 source ${BFAHOME}/bin/libbfa.sh || exit 1
geth_exec_js ${BFAHOME}/src/js.rewind geth_exec_file ${BFAHOME}/src/js.rewind
...@@ -29,7 +29,7 @@ console.log( thecontract.put.sendTransaction( [${hashes}], {from: eth.accounts[0 ...@@ -29,7 +29,7 @@ console.log( thecontract.put.sendTransaction( [${hashes}], {from: eth.accounts[0
EOT EOT
out=$( mktemp ) out=$( mktemp )
cleanup "$out" cleanup "$out"
geth_exec_js "${js}" > ${out} geth_exec_file "${js}" > ${out}
if [ ` wc -l < ${out} ` = 2 -a ` tail -1 < ${out} ` = "true" ] if [ ` wc -l < ${out} ` = 2 -a ` tail -1 < ${out} ` = "true" ]
then then
trans=` head -1 < ${out} ` trans=` head -1 < ${out} `
......
...@@ -25,7 +25,7 @@ console.log( thecontract.get.call( [${hashes}], {from: eth.accounts[0], gas: 100 ...@@ -25,7 +25,7 @@ console.log( thecontract.get.call( [${hashes}], {from: eth.accounts[0], gas: 100
EOT EOT
out=$( mktemp ) out=$( mktemp )
cleanup "$out" cleanup "$out"
geth_exec_js "${js}" > ${out} geth_exec_file "${js}" > ${out}
if [ ` wc -l < ${out} ` = 2 -a ` tail -1 < ${out} ` = "true" ] if [ ` wc -l < ${out} ` = 2 -a ` tail -1 < ${out} ` = "true" ]
then then
block=` head -1 < $out ` block=` head -1 < $out `
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment