zingolib icon indicating copy to clipboard operation
zingolib copied to clipboard

update_notes underflowing block height when 0-block batch is synced

Open AloeareV opened this issue 1 year ago • 0 comments

see https://github.com/zingolabs/zingolib/blob/212b3273e64b45a026774649f0b56ba184da2715/zingolib/src/blaze/block_witness_data.rs#L370

When the following loop happens 0 times, that value stays at 0..and is sent all the way to here https://github.com/zingolabs/zingolib/blob/212b3273e64b45a026774649f0b56ba184da2715/zingolib/src/blaze/update_notes.rs#L72 Where we hit an integer underflow by subtracting 1 from 0

AloeareV avatar Oct 02 '23 17:10 AloeareV