Fix off-by-one max payload checks

This commit is contained in:
Justin Starry
2020-09-15 15:25:00 +08:00
committed by Michael Vines
parent c231bb7154
commit f6cda2579f
4 changed files with 4 additions and 4 deletions

View File

@ -598,7 +598,7 @@ mod tests {
tx0.message.instructions[0].data = vec![1, 2, 3];
let message0a = tx0.message_data();
let tx_bytes = serialize(&tx0).unwrap();
assert!(tx_bytes.len() < PACKET_DATA_SIZE);
assert!(tx_bytes.len() <= PACKET_DATA_SIZE);
assert_eq!(
memfind(&tx_bytes, &tx0.signatures[0].as_ref()),
Some(SIG_OFFSET)