Move HEADER_LEN constant to top of file.
@@ -17,6 +17,9 @@ use crate::{constants, types::*, Network};
use super::message::Message;
+/// The length of a Bitcoin message header.
+const HEADER_LEN: usize = 24usize;
+
/// A codec which produces Bitcoin messages from byte streams and vice versa.
pub struct Codec {
builder: Builder,
@@ -89,9 +92,6 @@ impl Builder {
}
}
-/// The length of a Bitcoin message header.
-const HEADER_LEN: usize = 24usize;
-
// ======== Encoding =========
impl Codec {
