|
|
@ -772,7 +772,7 @@ static const char *linearize_shachain(const tal_t *ctx, |
|
|
|
} |
|
|
|
|
|
|
|
assert(tal_count(p) == SHACHAIN_SIZE); |
|
|
|
str = tal_hexstr(ctx, p, tal_count(p)); |
|
|
|
str = tal_hex(ctx, p); |
|
|
|
tal_free(p); |
|
|
|
return str; |
|
|
|
} |
|
|
@ -1011,7 +1011,7 @@ static const char *pubkeys_to_hex(const tal_t *ctx, const struct pubkey *ids) |
|
|
|
for (i = 0; i < tal_count(ids); i++) |
|
|
|
pubkey_to_der(ders + i * PUBKEY_DER_LEN, &ids[i]); |
|
|
|
|
|
|
|
return tal_hexstr(ctx, ders, tal_count(ders)); |
|
|
|
return tal_hex(ctx, ders); |
|
|
|
} |
|
|
|
static struct pubkey *pubkeys_from_arr(const tal_t *ctx, |
|
|
|
const void *blob, size_t len) |
|
|
@ -1518,7 +1518,7 @@ void db_new_htlc(struct peer *peer, const struct htlc *htlc) |
|
|
|
htlc->msatoshi, |
|
|
|
abs_locktime_to_blocks(&htlc->expiry), |
|
|
|
tal_hexstr(ctx, &htlc->rhash, sizeof(htlc->rhash)), |
|
|
|
tal_hexstr(ctx, htlc->routing, tal_count(htlc->routing)), |
|
|
|
tal_hex(ctx, htlc->routing), |
|
|
|
peerid, |
|
|
|
htlc->src->id); |
|
|
|
} else { |
|
|
@ -1531,7 +1531,7 @@ void db_new_htlc(struct peer *peer, const struct htlc *htlc) |
|
|
|
htlc->msatoshi, |
|
|
|
abs_locktime_to_blocks(&htlc->expiry), |
|
|
|
tal_hexstr(ctx, &htlc->rhash, sizeof(htlc->rhash)), |
|
|
|
tal_hexstr(ctx, htlc->routing, tal_count(htlc->routing))); |
|
|
|
tal_hex(ctx, htlc->routing)); |
|
|
|
} |
|
|
|
|
|
|
|
tal_free(ctx); |
|
|
@ -1798,8 +1798,7 @@ void db_set_our_closing_script(struct peer *peer) |
|
|
|
|
|
|
|
assert(peer->dstate->db->in_transaction); |
|
|
|
db_exec(__func__, peer->dstate, "UPDATE closing SET our_script=x'%s',shutdown_order=%"PRIu64" WHERE peer=x'%s';", |
|
|
|
tal_hexstr(ctx, peer->closing.our_script, |
|
|
|
tal_count(peer->closing.our_script)), |
|
|
|
tal_hex(ctx, peer->closing.our_script), |
|
|
|
peer->closing.shutdown_order, |
|
|
|
peerid); |
|
|
|
tal_free(ctx); |
|
|
@ -1815,8 +1814,7 @@ void db_set_their_closing_script(struct peer *peer) |
|
|
|
assert(peer->dstate->db->in_transaction); |
|
|
|
db_exec(__func__, peer->dstate, |
|
|
|
"UPDATE closing SET their_script=x'%s' WHERE peer=x'%s';", |
|
|
|
tal_hexstr(ctx, peer->closing.their_script, |
|
|
|
tal_count(peer->closing.their_script)), |
|
|
|
tal_hex(ctx, peer->closing.their_script), |
|
|
|
peerid); |
|
|
|
tal_free(ctx); |
|
|
|
} |
|
|
@ -1923,7 +1921,7 @@ void db_complete_pay_command(struct lightningd_state *dstate, |
|
|
|
else |
|
|
|
db_exec(__func__, dstate, |
|
|
|
"UPDATE pay SET fail=x'%s', htlc_peer=NULL WHERE rhash=x'%s';", |
|
|
|
tal_hexstr(ctx, htlc->fail, tal_count(htlc->fail)), |
|
|
|
tal_hex(ctx, htlc->fail), |
|
|
|
tal_hexstr(ctx, &htlc->rhash, sizeof(htlc->rhash))); |
|
|
|
|
|
|
|
tal_free(ctx); |
|
|
|