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

numpending.sh shows how many transactions are pending on the local node

parent 27dfc5e1
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
echo txpool.status.pending | geth_attach | grep -Ev '^> $' | tail -1
exit
function json_query
{
cmd=$1
params=$2
if [ -n "$params" ]
then
params=",\"parameters\":[$2]"
fi
json=$(
curl -s -H 'Content-type: application/json' -X POST --data "{\"jsonrpc\":\"2.0\",\"method\":\"${cmd}\"${params},\"id\":1}" http://127.0.0.1:$rpcport
)
}
bfaconfig node
json_query web3j_txpool
echo $json | jq
exit
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