pub fn new(rlps_to_swap: &[&'a [u8]], invalid_rlps: &[&'a [u8]]) -> Self {
		if rlps_to_swap.len() > 0x7e {
			panic!("Invalid usage, only 127 RLPs can be swappable.");
		}
		let mut invalid_to_valid = Map::new();
		let mut valid_to_invalid = Map::new();
		for (&rlp, &invalid) in rlps_to_swap.iter().zip(invalid_rlps.iter()) {
			invalid_to_valid.insert(invalid, rlp);
			valid_to_invalid.insert(rlp, invalid);
		}
		InvalidRlpSwapper {
			invalid_to_valid: invalid_to_valid,
			valid_to_invalid: valid_to_invalid
		}
	}
/// Construct a swapper from a list of common RLPs
Construct a swapper from a list of common RLPs
Construct a swapper from a list of common RLPs
pub fn new(rlps_to_swap: &[&'a [u8]], invalid_rlps: &[&'a [u8]]) -> Self {
		if rlps_to_swap.len() > 0x7e {
			panic!("Invalid usage, only 127 RLPs can be swappable.");
		}
		let mut invalid_to_valid = Map::new();
		let mut valid_to_invalid = Map::new();
		for (&rlp, &invalid) in rlps_to_swap.iter().zip(invalid_rlps.iter()) {
			invalid_to_valid.insert(invalid, rlp);
			valid_to_invalid.insert(rlp, invalid);
		}
		InvalidRlpSwapper {
			invalid_to_valid: invalid_to_valid,
			valid_to_invalid: valid_to_invalid
		}
	}
pub fn new ( rlps_to_swap : & [ & ' a [ u8 ] ] , invalid_rlps : & [ & ' a [ u8 ] ] ) -> Self { if rlps_to_swap . len ( ) > 0x7e { panic ! ( " " ) ; } let mut invalid_to_valid = Map :: new ( ) ; let mut valid_to_invalid = Map :: new ( ) ; for ( & rlp , & invalid ) in rlps_to_swap . iter ( ) . zip ( invalid_rlps . iter ( ) ) { invalid_to_valid . insert ( invalid , rlp ) ; valid_to_invalid . insert ( rlp , invalid ) ; } InvalidRlpSwapper { invalid_to_valid : invalid_to_valid , valid_to_invalid : valid_to_invalid } }
Construct a swapper from a list of common RLPs
Construct a swapper from a list of common RLPs
rlps_to_swap
&[&'a [u8]]
invalid_rlps
&[&'a [u8]]