Move HEADER_LEN constant to top of file.

This commit is contained in:
Henry de Valence 2019-09-25 09:00:04 -07:00
parent 2796a1a56b
commit f756c45786
1 changed files with 3 additions and 3 deletions

View 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 {