1
1
#include <ccan/crypto/sha256/sha256.h>
2
2
#include <ccan/endian/endian.h>
3
3
#include <ccan/err/err.h>
4
+ #include <ccan/mem/mem.h>
4
5
#include <ccan/read_write_all/read_write_all.h>
5
6
#include <ccan/str/hex/hex.h>
6
7
#include <ccan/tal/grab_file/grab_file.h>
7
8
#include <assert.h>
8
9
#include "tx.h"
9
- #include "valgrind.h"
10
10
11
11
enum styles {
12
12
/* Add the CT padding stuff to amount. */
@@ -197,7 +197,7 @@ static void add_tx(const struct bitcoin_tx *tx,
197
197
static void add_sha (const void * data , size_t len , void * shactx_ )
198
198
{
199
199
struct sha256_ctx * ctx = shactx_ ;
200
- sha256_update (ctx , check_mem (data , len ), len );
200
+ sha256_update (ctx , memcheck (data , len ), len );
201
201
}
202
202
203
203
void sha256_tx_for_sig (struct sha256_ctx * ctx , const struct bitcoin_tx * tx ,
@@ -219,7 +219,7 @@ static void add_linearize(const void *data, size_t len, void *pptr_)
219
219
size_t oldsize = tal_count (* pptr );
220
220
221
221
tal_resize (pptr , oldsize + len );
222
- memcpy (* pptr + oldsize , check_mem (data , len ), len );
222
+ memcpy (* pptr + oldsize , memcheck (data , len ), len );
223
223
}
224
224
225
225
u8 * linearize_tx (const tal_t * ctx , const struct bitcoin_tx * tx )
@@ -278,7 +278,7 @@ static const u8 *pull(const u8 **cursor, size_t *max, void *copy, size_t n)
278
278
* max -= n ;
279
279
if (copy )
280
280
memcpy (copy , p , n );
281
- return check_mem (p , n );
281
+ return memcheck (p , n );
282
282
}
283
283
284
284
static u64 pull_varint (const u8 * * cursor , size_t * max )
0 commit comments