Browse Source

type_to_string: support ripemd160.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
parent
commit
86313383a7
  1. 5
      common/type_to_string.c
  2. 2
      common/type_to_string.h

5
common/type_to_string.c

@ -1,10 +1,13 @@
#include <ccan/crypto/ripemd160/ripemd160.h>
#include <ccan/crypto/sha256/sha256.h>
#include <ccan/tal/str/str.h>
#include <common/type_to_string.h>
#include <common/utils.h>
#include <inttypes.h>
/* We need at least one, and this is in CCAN so register it here. */
/* We need at least one, and these are in CCAN so register it here. */
REGISTER_TYPE_TO_HEXSTR(sha256);
REGISTER_TYPE_TO_HEXSTR(ripemd160);
char *type_to_string_(const tal_t *ctx, const char *typename,
union printable_types u)

2
common/type_to_string.h

@ -3,7 +3,6 @@
#include "config.h"
#include "utils.h"
#include <ccan/autodata/autodata.h>
#include <ccan/crypto/sha256/sha256.h>
#include <secp256k1.h>
/* This must match the type_to_string_ cases. */
@ -11,6 +10,7 @@ union printable_types {
const struct pubkey *pubkey;
const struct sha256_double *sha256_double;
const struct sha256 *sha256;
const struct ripemd160 *ripemd160;
const struct rel_locktime *rel_locktime;
const struct abs_locktime *abs_locktime;
const struct bitcoin_tx *bitcoin_tx;

Loading…
Cancel
Save