Use an atomic for the value of channels' unused-since timestamps
See discussion on !273 (merged): We'd like to have the unused_since
field in ChannelDetails
be atomic, or implemented in terms of an atomic.
On that MR I suggested:
I'd define a new
OptTimestamp
type, based on Timestamp, except with the value 0 representing None. It would behave semantically likeOption<Timestamp>
, but internally it would just be an AtomicU64. Then I'd give it bothupdate()
andclear()
functions to change its state, along with the other accessors that the functionsupdate_disused_since
andduration_unused
would need.