openethereum/ethcore/light/src/net
Andrew Jones a04c5b180a Replace legacy Rlp with UntrustedRlp and use in ethcore rlp views (#8316)
* WIP

* Replace Rlp with UntrustedRlp in views, explicity unwrap with expect

First pass to get it to compile. Need to figure out whether to do this or to propogate Errors upstream, which would require many more changes to dependent code. If we do this way we are assuming that the views are always used in a context where the rlp is trusted to be valid e.g. when reading from our own DB. So need to fid out whether views are used with data received from an untrusted (e.g. extrernal peer).

* Remove original Rlp impl, rename UntrustedRlp -> Rlp

* Create rlp views with view! macro to record debug info

Views are assumed to be over valid rlp, so if there is a decoding error we record where the view was created in the first place and report it in the expect

* Use $crate in view! macro to avoid import, fix tests

* Expect valid rlp in decode functions for now

* Replace spaces with tabs in new file

* Add doc tests for creating views with macro

* Update rlp docs to reflect removing of UntrustedRlp

* Replace UntrustedRlp usages in private-tx merge
2018-04-16 15:52:12 +02:00
..
tests Replace legacy Rlp with UntrustedRlp and use in ethcore rlp views (#8316) 2018-04-16 15:52:12 +02:00
context.rs Abstract devp2p (#8048) 2018-03-05 11:56:35 +01:00
error.rs use error-chain in ethcore-network 2017-11-13 16:48:58 +01:00
load_timer.rs More code refactoring to integrate Duration (#8322) 2018-04-14 21:35:58 +02:00
mod.rs Replace legacy Rlp with UntrustedRlp and use in ethcore rlp views (#8316) 2018-04-16 15:52:12 +02:00
request_credits.rs Replace legacy Rlp with UntrustedRlp and use in ethcore rlp views (#8316) 2018-04-16 15:52:12 +02:00
request_set.rs Remove the time dependency where possible (#8100) 2018-03-14 12:29:52 +01:00
status.rs Replace legacy Rlp with UntrustedRlp and use in ethcore rlp views (#8316) 2018-04-16 15:52:12 +02:00