rust-lightning
rust-lightning copied to clipboard
`AtomicCounter` starts at 0x100000001
It should be checking if low == usize::MAX as u64 not low == 0. Should be harmless cause our uses of it shouldn't care about the value, only that its a fresh one each time, but when I fix it some tests fail, so opening this in the hopes someone else does the work.
Id like to try this issue! I have a question tho, is there a specific reason that the atomic counter in lightning/src/util/atomic_counter.rs contains two AtomicUsizes, instead of just a single AtomicU64? @TheBlueMatt
Not every platform supports atomic u64s.