diff --git a/common/hsm_version.h b/common/hsm_version.h index 3fd2135e0..41f179d69 100644 --- a/common/hsm_version.h +++ b/common/hsm_version.h @@ -4,6 +4,14 @@ /* We give a maximum and minimum compatibility version to HSM, to allow * some API adaptation. */ + +/* wire/hsmd_wire.csv contents version: + * 409cffa355ab6cc76bd298910adca9936a68223267ddc4815ba16aeac5d0acc3 + */ #define HSM_MIN_VERSION 1 + +/* wire/hsmd_wire.csv contents version: + * 409cffa355ab6cc76bd298910adca9936a68223267ddc4815ba16aeac5d0acc3 + */ #define HSM_MAX_VERSION 1 #endif /* LIGHTNING_COMMON_HSM_VERSION_H */ diff --git a/hsmd/Makefile b/hsmd/Makefile index 6fd4dac59..40f74edb5 100644 --- a/hsmd/Makefile +++ b/hsmd/Makefile @@ -56,4 +56,10 @@ HSMD_COMMON_OBJS := \ lightningd/lightning_hsmd: $(HSMD_OBJS) $(HSMD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) +check-source: check-hsm-versions + +# common/hsm_version.h should at least *mention* this! +check-hsm-versions: hsmd/hsmd_wire.csv common/hsm_version.h + @SUM=`grep -vE '^(#| *$$)' hsmd/hsmd_wire.csv | sha256sum | cut -c1-64`; if ! grep -q "$$SUM" common/hsm_version.h; then echo "*** hsmd_wire.csv changed to $$SUM without update to common/hsm_version.h">&2; exit 1; fi + -include hsmd/test/Makefile