Skip to content

Commit ddc5e26

Browse files
committed
Merge #38: whitelist: Fix occasional overflow in unit test
02f1666 whitelist: Fix occasional overflow in unit test (Steven Roose) Pull request description: ACKs for top commit: jonasnick: utACK 02f1666 Tree-SHA512: 2eef146993378914658981f595680ae1d0616b60844dae306f53dd44cdde7042166008bd5d512dfb91583d574663bc5a78ad14048e1fcd55cc9095ae7e8cc296
2 parents c8ff901 + 02f1666 commit ddc5e26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zkp/whitelist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ mod tests {
404404
// incorrectly serialized with byte changed
405405
let mut encoded = correct_signature.serialize();
406406
let len = encoded.len();
407-
encoded[len - 1] = (encoded[len - 1] + 1) % 255;
407+
encoded[len - 1] = encoded[len - 1] ^ 0x01;
408408
let decoded = WhitelistSignature::from_slice(&encoded).unwrap();
409409
assert_eq!(
410410
Err(Error::InvalidWhitelistProof),

0 commit comments

Comments
 (0)