mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
The peer->seed needs to be unique for each channel, since bitcoin pubkeys and the shachain are generated from it. However we also need to guarantee that the same seed is generated for a given channel every time, e.g., upon a restart. The DB channel ID is guaranteed to be unique, and will not change throughout the lifetime of a channel, so we simply mix it in, instead of a separate increasing counter. We also needed to make sure to store in the DB before deriving the seed, in order to get an ID assigned by the DB. Signed-off-by: Christian Decker <decker.christian@gmail.com> |
||
---|---|---|
.. | ||
.gitignore | ||
db.c | ||
db.h | ||
db_tests.c | ||
Makefile | ||
test_utils.h | ||
wallet.c | ||
wallet.h | ||
wallet_tests.c | ||
walletrpc.c | ||
walletrpc.h |