mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
cefb6925b2
It's an array: we were only saving the single element; if there was more than one changed HTLC we'd get a bad signature! The report in #1907 is probably caused by the other side re-requesting something we considered already finalized; to avoid this particular error, we should set the field to NULL if there's no last_sent_commit. I'm increasingly of the opinion we want to just save all the update packets to the db and blast them out, instead of doing this second-guessing dance. Fixes: #1907 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
36 lines
1023 B
Makefile
36 lines
1023 B
Makefile
WALLET_TEST_SRC := $(wildcard wallet/test/run-*.c)
|
|
WALLET_TEST_OBJS := $(WALLET_TEST_SRC:.c=.o)
|
|
WALLET_TEST_PROGRAMS := $(WALLET_TEST_OBJS:.o=)
|
|
|
|
WALLET_TEST_COMMON_OBJS := \
|
|
common/base32.o \
|
|
common/derive_basepoints.o \
|
|
common/htlc_state.o \
|
|
common/htlc_wire.o \
|
|
common/type_to_string.o \
|
|
common/memleak.o \
|
|
common/key_derive.o \
|
|
common/pseudorand.o \
|
|
common/timeout.o \
|
|
common/utils.o \
|
|
common/wireaddr.o \
|
|
common/version.o \
|
|
wire/towire.o \
|
|
wire/fromwire.o
|
|
|
|
# Make sure these depend on everything.
|
|
ALL_TEST_PROGRAMS += $(WALLET_TEST_PROGRAMS)
|
|
ALL_OBJS += $(WALLET_LIB_OBJS) $(WALLET_TEST_OBJS)
|
|
|
|
$(WALLET_TEST_PROGRAMS): $(BITCOIN_OBJS) $(WALLET_TEST_COMMON_OBJS)
|
|
$(WALLET_TEST_OBJS): $(WALLET_LIB_HEADERS) $(WALLET_LIB_SRC)
|
|
|
|
wallet/tests: $(WALLET_TEST_PROGRAMS:%=unittest/%)
|
|
|
|
$(WALLET_TEST_PROGRAMS): $(WALLET_TEST_COMMON_OBJS) $(BITCOIN_OBJS)
|
|
$(WALLET_TEST_OBJS): $(WALLET_SRC)
|
|
|
|
update-mocks: $(WALLET_TEST_SRC:%=update-mocks/%)
|
|
|
|
check: $(WALLET_TEST_PROGRAMS:%=unittest/%)
|