MCPcopy Create free account
hub / github.com/ElementsProject/lightning / mempat

Function mempat

wallet/test/run-wallet.c:948–954  ·  view source on GitHub ↗

* mempat -- Set the memory to a pattern * * Used mainly to check that we don't mix fields while * serializing/unserializing. */

Source from the content-addressed store, hash-verified

946 * serializing/unserializing.
947 */
948static void mempat(void *dst, size_t len)
949{
950 static int n = 0;
951 u8 *p = (u8*)dst;
952 for(int i=0 ; i < len; ++i)
953 p[i] = n % 251; /* Prime */
954}
955
956/* Destructor for the wallet which unlinks the underlying file */
957static void cleanup_test_wallet(struct wallet *w, char *filename)

Callers 3

test_channel_crudFunction · 0.85
test_payment_crudFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected