lightningd: dev_newhtlc command.

For testing point-to-point HTLCs.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-04-01 20:54:59 +10:30
parent 7919279367
commit 47da80fdca
5 changed files with 142 additions and 4 deletions

View File

@@ -50,6 +50,11 @@ check "lcli2 getpeers info | $FGREP 'Funding tx reached depth'"
check "lcli1 getpeers | tr -s '\012\011\" ' ' ' | $FGREP 'condition : Normal operation'"
check "lcli2 getpeers | tr -s '\012\011\" ' ' ' | $FGREP 'condition : Normal operation'"
SECRET=1de08917a61cb2b62ed5937d38577f6a7bfe59c176781c6d8128018e8b5ccdfd
RHASH=`lcli1 dev-rhash $SECRET | sed 's/.*"\([0-9a-f]*\)".*/\1/'`
lcli1 dev-newhtlc $ID2 100000 $(( $(blockheight) + 10 )) $RHASH
lcli1 stop
lcli2 stop