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

Function funding_spent

lightningd/peer_control.c:1848–1859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1846}
1847
1848static enum watch_result funding_spent(struct channel *channel,
1849 const struct bitcoin_tx *tx,
1850 size_t inputnum UNUSED,
1851 const struct block *block)
1852{
1853 struct bitcoin_txid txid;
1854 bitcoin_txid(tx, &txid);
1855
1856 wallet_channeltxs_add(channel->peer->ld->wallet, channel,
1857 WIRE_ONCHAIND_INIT, &txid, 0, block->height);
1858 return onchaind_funding_spent(channel, tx, block->height);
1859}
1860
1861void channel_watch_wrong_funding(struct lightningd *ld, struct channel *channel)
1862{

Callers

nothing calls this directly

Calls 3

bitcoin_txidClass · 0.70
onchaind_funding_spentFunction · 0.70
wallet_channeltxs_addFunction · 0.50

Tested by

no test coverage detected