mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
getinput.sh: Switch to -regtest
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
9ed6968fe5
commit
baf5d11643
10
getinput.sh
10
getinput.sh
@ -23,13 +23,13 @@ if [ $# -gt 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$KEY" ]; then
|
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
|
bitcoin-cli dumpprivkey $ADDR
|
||||||
else
|
else
|
||||||
TXID=`bitcoin-cli -testnet listunspent | sed -n 's/^ "txid" : "\([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 -testnet listunspent | sed -n 's/^ "vout" : \([0-9]*\),$/\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 -testnet listunspent | sed -n 's/^ "amount" : \([0-9.]*\),$/\1/p' | tail -n +$NUM | head -n1 | tr -d . | sed 's/^0*//'`
|
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 -testnet listunspent | sed -n 's/^ "scriptPubKey" : "\([0-9a-f]*\)",$/\1/p' | tail -n +$NUM | head -n1`
|
SCRIPT=`bitcoin-cli -regtest listunspent | sed -n 's/^ "scriptPubKey" : "\([0-9a-f]*\)",$/\1/p' | tail -n +$NUM | head -n1`
|
||||||
|
|
||||||
echo $TXID/$OUTNUM/$AMOUNT/$SCRIPT
|
echo $TXID/$OUTNUM/$AMOUNT/$SCRIPT
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user