Core tracedb functionality. (#996)
* fixed encoding 0u8 * simplified if else stmt * tracedb core * more comprehensive tracedb tests * fixed minor review issues * addresses filter * fixed typos * replace malformed with corrupted * trace switch * db key is generic and can be made smaller * smaller tracedb keys * tracedb version * fixed ignored tests * rename Tracedb -> TraceDB * fixed typos * proves * trace only top level calls to builtins to avoid DDoS attacks * fixed tracedb config switches * fix comments fat replaced with trace * vector-addressing scheme for localized traces * removed comments * removed first, redundant 0 from trace address * updated db.trace method * additional tests for tracedb.trace()
This commit is contained in:
@@ -78,6 +78,12 @@ macro_rules! impl_hash {
|
||||
/// Unformatted binary data of fixed length.
|
||||
pub struct $from (pub [u8; $size]);
|
||||
|
||||
impl From<[u8; $size]> for $from {
|
||||
fn from(bytes: [u8; $size]) -> Self {
|
||||
$from(bytes)
|
||||
}
|
||||
}
|
||||
|
||||
impl Deref for $from {
|
||||
type Target = [u8];
|
||||
|
||||
|
||||
@@ -40,7 +40,9 @@ pub enum DecoderError {
|
||||
/// Non-canonical (longer than necessary) representation used for data or list.
|
||||
RlpInvalidIndirection,
|
||||
/// Declared length is inconsistent with data specified after.
|
||||
RlpInconsistentLengthAndData
|
||||
RlpInconsistentLengthAndData,
|
||||
/// Custom rlp decoding error.
|
||||
Custom(&'static str),
|
||||
}
|
||||
|
||||
impl StdError for DecoderError {
|
||||
|
||||
Reference in New Issue
Block a user