Also based on pettycoin code. (With embarrassing bug fixed where it didn't increment the address used, thus using 100% CPU if that connect failed!) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>