remove #repr on RejectReason

and typo fix
This commit is contained in:
Tamas Blummer 2019-09-10 19:44:39 +02:00
parent c93b1ed8ce
commit 960e3da75b
1 changed files with 1 additions and 2 deletions

View File

@ -84,7 +84,6 @@ impl_consensus_encoding!(VersionMessage, version, services, timestamp,
receiver, sender, nonce, receiver, sender, nonce,
user_agent, start_height, relay); user_agent, start_height, relay);
#[repr(u8)]
#[derive(PartialEq, Eq, Clone, Copy, Debug)] #[derive(PartialEq, Eq, Clone, Copy, Debug)]
/// message rejection reason as a code /// message rejection reason as a code
pub enum RejectReason { pub enum RejectReason {
@ -124,7 +123,7 @@ impl Decodable for RejectReason {
0x41 => DUST, 0x41 => DUST,
0x42 => FEE, 0x42 => FEE,
0x43 => CHECKPOINT, 0x43 => CHECKPOINT,
_ => return Err(encode::Error::ParseFailed("unknonw reject code")) _ => return Err(encode::Error::ParseFailed("unknown reject code"))
}) })
} }
} }