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

Function wallet_announcement_save

wallet/wallet.c:1831–1846  ·  view source on GitHub ↗

When we receive the remote announcement message, we will also call this function */

Source from the content-addressed store, hash-verified

1829
1830/* When we receive the remote announcement message, we will also call this function */
1831void wallet_announcement_save(struct wallet *w, u64 id,
1832 secp256k1_ecdsa_signature *remote_ann_node_sig,
1833 secp256k1_ecdsa_signature *remote_ann_bitcoin_sig)
1834{
1835 struct db_stmt *stmt;
1836
1837 stmt = db_prepare_v2(w->db, SQL("UPDATE channels SET"
1838 " remote_ann_node_sig=?,"
1839 " remote_ann_bitcoin_sig=?"
1840 " WHERE id=?"));
1841
1842 db_bind_signature(stmt, 0, remote_ann_node_sig);
1843 db_bind_signature(stmt, 1, remote_ann_bitcoin_sig);
1844 db_bind_u64(stmt, 2, id);
1845 db_exec_prepared_v2(take(stmt));
1846}
1847
1848void wallet_channel_save(struct wallet *w, struct channel *chan)
1849{

Callers 2

test_channel_crudFunction · 0.85
peer_got_announcementFunction · 0.85

Calls 3

db_bind_signatureFunction · 0.85
db_bind_u64Function · 0.85
db_exec_prepared_v2Function · 0.85

Tested by 1

test_channel_crudFunction · 0.68