When we receive the remote announcement message, we will also call this function */
| 1829 | |
| 1830 | /* When we receive the remote announcement message, we will also call this function */ |
| 1831 | void 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 | |
| 1848 | void wallet_channel_save(struct wallet *w, struct channel *chan) |
| 1849 | { |