Browse Source
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>ppa-0.6.1
Christian Decker
8 years ago
committed by
Rusty Russell
4 changed files with 40 additions and 13 deletions
Loading…
Reference in new issue