From 5397da0c93a4d42900f1feb578b79cb1fc78ecec Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Tue, 7 Jun 2016 12:30:35 -0700 Subject: [PATCH] Remove old code/comment. --- ethcore/src/block.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/ethcore/src/block.rs b/ethcore/src/block.rs index 0b75f5a7e..c10542866 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -38,23 +38,7 @@ pub struct Block { impl Block { /// Returns true if the given bytes form a valid encoding of a block in RLP. - // TODO: implement Decoder for this and have this use that. pub fn is_good(b: &[u8]) -> bool { - /* - let urlp = UntrustedRlp::new(&b); - if !urlp.is_list() || urlp.item_count() != 3 || urlp.size() != b.len() { return false; } - if urlp.val_at::
(0).is_err() { return false; } - - if !urlp.at(1).unwrap().is_list() { return false; } - if urlp.at(1).unwrap().iter().find(|i| i.as_val::().is_err()).is_some() { - return false; - } - - if !urlp.at(2).unwrap().is_list() { return false; } - if urlp.at(2).unwrap().iter().find(|i| i.as_val::
().is_err()).is_some() { - return false; - } - true*/ UntrustedRlp::new(b).as_val::().is_ok() } }