-
Notifications
You must be signed in to change notification settings - Fork 417
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
Prior to having a generic "get random value" API in the KeysInterface, we'd simply documented that the user should ranomize PendingHTLCsForwardable
's forwardable time themselves. However, we shouldn't push that complexity onto users if we can avoid it, and since we now have a random bytes source, we can do it internally. This would involve simply taking a byte or 2 bytes at a time out of a buffer refilled from KeysInterface::get_secure_random_bytes
when it runs out and multiplying time_forwardable
by those bytes as u8/16
, then dividing to get them back into the *(1-5) range, or so.
When we do that, we can probably skip the randomization in the on-reload forwardable event generation, see #1076 (comment)
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers