Fix off-by-one max payload checks (bp #12230) (#12284)

* Fix off-by-one max payload checks

(cherry picked from commit f6cda2579f)

# Conflicts:
#	faucet/src/faucet.rs

* Update faucet.rs

Co-authored-by: Justin Starry <justin@solana.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
mergify[bot]
2020-09-16 21:09:20 +00:00
committed by GitHub
parent a492357964
commit ac07fb392d
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)