rust-lightning icon indicating copy to clipboard operation
rust-lightning copied to clipboard

`AtomicCounter` starts at 0x100000001

Open TheBlueMatt opened this issue 1 year ago • 2 comments

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.

TheBlueMatt avatar Apr 17 '24 20:04 TheBlueMatt

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

cooltexture1 avatar Aug 13 '24 16:08 cooltexture1

Not every platform supports atomic u64s.

TheBlueMatt avatar Aug 13 '24 17:08 TheBlueMatt