dualfund: rearrange things so that the wire-dependent calls are separate

There's a few structs/wire calls that only exist under experimental features.
These were in a common file that was shared/used a bunch of places but
this causes problems. Here we move one of the problematic methods back
into `openingd`, as it's only used locally and then isolate the
references to the `witness_stack` in a new `common/psbt_internal` file.

This lets us remove the iff EXP_FEATURES inclusion switches in most of
the Makefiles.
This commit is contained in:
niftynei
2020-10-08 16:40:25 -05:00
committed by Rusty Russell
parent cdfb825336
commit 4508584b21
17 changed files with 216 additions and 229 deletions

View File

@@ -33,6 +33,7 @@ DEVTOOLS_COMMON_OBJS := \
common/memleak.o \
common/node_id.o \
common/per_peer_state.o \
common/psbt_open.o \
common/pseudorand.o \
common/json.o \
common/json_helpers.o \
@@ -44,10 +45,6 @@ DEVTOOLS_COMMON_OBJS := \
wire/onion$(EXP)_wiregen.o \
wire/peer$(EXP)_wiregen.o
ifeq ($(EXPERIMENTAL_FEATURES),1)
DEVTOOLS_COMMON_OBJS += common/psbt_open.o
endif
devtools/bolt11-cli: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/bolt11-cli.o
devtools/decodemsg: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) $(WIRE_PRINT_OBJS) wire/fromwire.o wire/towire.o devtools/print_wire.o devtools/decodemsg.o