helpers.sh: set up funding in start_lightningd()

Every test wants this anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-11-10 23:33:35 +10:30
parent 9e777ae922
commit c6a187a5d7
2 changed files with 8 additions and 6 deletions

View File

@@ -188,6 +188,14 @@ start_lightningd()
PORT2=`get_info_field "$LCLI2" port`
[ $NUM_LIGHTNINGD = 2 ] || PORT3=`get_info_field "$LCLI3" port`
# Make a payment into a P2SH for anchor.
P2SHADDR=`$LCLI1 newaddr | sed -n 's/{ "address" : "\(.*\)" }/\1/p'`
FUND_INPUT_TXID=`$CLI sendtoaddress $P2SHADDR 0.01`
FUND_INPUT_TX=`$CLI getrawtransaction $FUND_INPUT_TXID`
# Mine it so check_tx_spend doesn't see it (breaks some tests).
$CLI generate 1
}
lcli1()