You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)