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

Function new_tx_state

openingd/dualopend.c:134–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132};
133
134static struct tx_state *new_tx_state(const tal_t *ctx)
135{
136 struct tx_state *tx_state = tal(ctx, struct tx_state);
137 tx_state->psbt = NULL;
138 tx_state->remote_funding_sigs_rcvd = false;
139 tx_state->local_funding_sigs_sent = false;
140 tx_state->has_commitments = false;
141
142 tx_state->lease_expiry = 0;
143 tx_state->lease_fee = AMOUNT_SAT(0);
144 tx_state->blockheight = 0;
145 tx_state->lease_commit_sig = NULL;
146 tx_state->lease_chan_max_msat = 0;
147 tx_state->lease_chan_max_ppt = 0;
148
149 /* no max_htlc_dust_exposure on remoteconf, we exclusively use the local's */
150 tx_state->remoteconf.max_dust_htlc_exposure_msat = AMOUNT_MSAT(0);
151
152 for (size_t i = 0; i < NUM_TX_MSGS; i++)
153 tx_state->tx_msg_count[i] = 0;
154
155 return tx_state;
156}
157
158/* Global state structure. This is only for the one specific peer and channel */
159struct state {

Callers 3

rbf_local_startFunction · 0.85
rbf_remote_startFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected