Add const_assert_eq to PACKET_DATA_SIZE (#26227)

This commit is contained in:
Ryo Onodera 2022-06-27 13:58:08 +09:00 committed by GitHub
parent a741eddf7d
commit 090e11210a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

1
Cargo.lock generated
View File

@ -5954,6 +5954,7 @@ dependencies = [
"solana-logger 1.11.2",
"solana-program 1.11.2",
"solana-sdk-macro 1.11.2",
"static_assertions",
"thiserror",
"tiny-bip39",
"uriparse",

View File

@ -86,6 +86,7 @@ js-sys = "0.3.57"
[dev-dependencies]
anyhow = "1.0.57"
curve25519-dalek = "3.2.1"
static_assertions = "1.1.0"
tiny-bip39 = "0.8.2"
[build-dependencies]

View File

@ -9,6 +9,8 @@ use {
},
};
#[cfg(test)]
static_assertions::const_assert_eq!(PACKET_DATA_SIZE, 1232);
/// Maximum over-the-wire size of a Transaction
/// 1280 is IPv6 minimum MTU
/// 40 bytes is the size of the IPv6 header