mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
85ff95e829
To avoid everything pulling in HTLCs stuff to the opening daemon, we split the channel and commit_tx routines into initial_channel and initial_commit_tx (no HTLC support) and move full HTLC supporting versions into channeld. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
18 lines
490 B
C
18 lines
490 B
C
#include "shadouble.h"
|
|
#include <ccan/mem/mem.h>
|
|
#include <common/type_to_string.h>
|
|
|
|
void sha256_double(struct sha256_double *shadouble, const void *p, size_t len)
|
|
{
|
|
sha256(&shadouble->sha, memcheck(p, len), len);
|
|
sha256(&shadouble->sha, &shadouble->sha, sizeof(shadouble->sha));
|
|
}
|
|
|
|
void sha256_double_done(struct sha256_ctx *shactx, struct sha256_double *res)
|
|
{
|
|
sha256_done(shactx, &res->sha);
|
|
sha256(&res->sha, &res->sha, sizeof(res->sha));
|
|
}
|
|
|
|
REGISTER_TYPE_TO_HEXSTR(sha256_double);
|