core-lightning/channeld/splice.c
Rusty Russell 568f277835 channeld: replace struct splice with struct splicing for OpenBSD.
Since it's only for transitory splicing info, the new name makes sense.

```
cc channeld/channeld.c
In file included from channeld/channeld.c:23:
./channeld/splice.h:37:8: error: redefinition of 'splice'
struct splice {
       ^
/usr/include/sys/socket.h:140:8: note: previous definition is here
struct  splice {
        ^
```

Reported-by: @grubles
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: #6486
2023-08-03 13:43:35 +09:30

38 lines
999 B
C

#include "config.h"
#include <ccan/tal/tal.h>
#include <channeld/splice.h>
struct splice_state *splice_state_new(const tal_t *ctx)
{
struct splice_state *splice_state = tal(ctx, struct splice_state);
splice_state->committed_count = 0;
splice_state->revoked_count = 0;
splice_state->count = 0;
splice_state->locked_ready[LOCAL] = false;
splice_state->locked_ready[REMOTE] = false;
splice_state->await_commitment_succcess = false;
splice_state->inflights = NULL;
return splice_state;
}
struct splicing *splicing_new(const tal_t *ctx)
{
struct splicing *splicing = tal(ctx, struct splicing);
splicing->opener_relative = 0;
splicing->accepter_relative = 0;
splicing->feerate_per_kw = 0;
splicing->force_feerate = false;
splicing->force_sign_first = false;
splicing->mode = false;
splicing->tx_add_input_count = 0;
splicing->tx_add_output_count = 0;
splicing->current_psbt = NULL;
splicing->received_tx_complete = false;
splicing->sent_tx_complete = false;
return splicing;
}