It's just a sha256_double, but importantly when we convert it to a string (in type_to_string, which is used in logging) we use bitcoin_txid_to_hex() so it's reversed as people expect. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>