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

PoC for flooding the network with transactions

parent 0d0e988e
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
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
cd $BFAHOME
while :
do
while num=` $BFAHOME/bin/numpending.sh `; [ $num -lt 2500 ]
do
contract=$( readlink ${BFANETWORKDIR}/contracts/TimestampDocument )
abi=$( cat ${BFANETWORKDIR}/contracts/${contract}/abi )
(
echo "var mycontract = eth.contract(JSON.parse($abi));"
echo "var thecontract = mycontract.at(\"$contract\");"
n=0
SECONDS=0
while [ $n -lt 10000 -a $SECONDS -lt 600 ]
do
n=$(( $n + 1 ))
echo "thecontract.storeDocument.sendTransaction( \"dagenidag.${n}\", {from: eth.accounts[0], gas: 1000000});"
done
) |
geth_attach
done
echo `date`: $num pending.
sleep 2
done
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