Browse Source

wally: remove wally casts that are no longer needed

Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
fix-mocks
Jon Griffiths 4 years ago
committed by Rusty Russell
parent
commit
5c2fc4c1cb
  1. 7
      bitcoin/psbt.c
  2. 1
      bitcoin/tx.c

7
bitcoin/psbt.c

@ -4,7 +4,6 @@
#include <bitcoin/pubkey.h> #include <bitcoin/pubkey.h>
#include <bitcoin/script.h> #include <bitcoin/script.h>
#include <bitcoin/signature.h> #include <bitcoin/signature.h>
#include <ccan/cast/cast.h>
#include <ccan/ccan/array_size/array_size.h> #include <ccan/ccan/array_size/array_size.h>
#include <ccan/ccan/mem/mem.h> #include <ccan/ccan/mem/mem.h>
#include <ccan/tal/str/str.h> #include <ccan/tal/str/str.h>
@ -519,16 +518,14 @@ static bool wally_map_set_unknown(const tal_t *ctx,
struct wally_map_item *item; struct wally_map_item *item;
assert(value_len != 0); assert(value_len != 0);
if (wally_map_find(map, if (wally_map_find(map, key, tal_bytelen(key), &exists_at) != WALLY_OK)
cast_const(unsigned char *, key), tal_bytelen(key),
&exists_at) != WALLY_OK)
return false; return false;
/* If not exists, add */ /* If not exists, add */
if (exists_at == 0) { if (exists_at == 0) {
bool ok; bool ok;
tal_wally_start(); tal_wally_start();
ok = wally_map_add(map, cast_const(unsigned char *, key), tal_bytelen(key), ok = wally_map_add(map, key, tal_bytelen(key),
(unsigned char *) memcheck(value, value_len), value_len) (unsigned char *) memcheck(value, value_len), value_len)
== WALLY_OK; == WALLY_OK;
tal_wally_end(ctx); tal_wally_end(ctx);

1
bitcoin/tx.c

@ -4,7 +4,6 @@
#include <bitcoin/psbt.h> #include <bitcoin/psbt.h>
#include <bitcoin/script.h> #include <bitcoin/script.h>
#include <bitcoin/tx.h> #include <bitcoin/tx.h>
#include <ccan/cast/cast.h>
#include <ccan/crypto/sha256/sha256.h> #include <ccan/crypto/sha256/sha256.h>
#include <ccan/endian/endian.h> #include <ccan/endian/endian.h>
#include <ccan/mem/mem.h> #include <ccan/mem/mem.h>

Loading…
Cancel
Save