From baf5d11643e60f4121722e7d53615c9939ede20f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 8 Jun 2015 06:28:09 +0930 Subject: [PATCH] getinput.sh: Switch to -regtest Signed-off-by: Rusty Russell --- getinput.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/getinput.sh b/getinput.sh index 35f8b3163..ae9a0598b 100755 --- a/getinput.sh +++ b/getinput.sh @@ -23,13 +23,13 @@ if [ $# -gt 0 ]; then fi if [ -n "$KEY" ]; then - ADDR=`bitcoin-cli -testnet listunspent | sed -n 's/^ "address" : "\([0-9a-zA-Z]*\)",$/\1/p' | tail -n +$NUM | head -n1` + ADDR=`bitcoin-cli -regtest listunspent | sed -n 's/^ "address" : "\([0-9a-zA-Z]*\)",$/\1/p' | tail -n +$NUM | head -n1` bitcoin-cli dumpprivkey $ADDR else - TXID=`bitcoin-cli -testnet listunspent | sed -n 's/^ "txid" : "\([0-9a-f]*\)",$/\1/p' | tail -n +$NUM | head -n1` - OUTNUM=`bitcoin-cli -testnet listunspent | sed -n 's/^ "vout" : \([0-9]*\),$/\1/p' | tail -n +$NUM | head -n1` - AMOUNT=`bitcoin-cli -testnet listunspent | sed -n 's/^ "amount" : \([0-9.]*\),$/\1/p' | tail -n +$NUM | head -n1 | tr -d . | sed 's/^0*//'` - SCRIPT=`bitcoin-cli -testnet listunspent | sed -n 's/^ "scriptPubKey" : "\([0-9a-f]*\)",$/\1/p' | tail -n +$NUM | head -n1` + TXID=`bitcoin-cli -regtest listunspent | sed -n 's/^ "txid" : "\([0-9a-f]*\)",$/\1/p' | tail -n +$NUM | head -n1` + OUTNUM=`bitcoin-cli -regtest listunspent | sed -n 's/^ "vout" : \([0-9]*\),$/\1/p' | tail -n +$NUM | head -n1` + AMOUNT=`bitcoin-cli -regtest listunspent | sed -n 's/^ "amount" : \([0-9.]*\),$/\1/p' | tail -n +$NUM | head -n1 | tr -d . | sed 's/^0*//'` + SCRIPT=`bitcoin-cli -regtest listunspent | sed -n 's/^ "scriptPubKey" : "\([0-9a-f]*\)",$/\1/p' | tail -n +$NUM | head -n1` echo $TXID/$OUTNUM/$AMOUNT/$SCRIPT fi