-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Trace filtering fix #2760
Trace filtering fix #2760
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,8 +42,13 @@ impl From<Vec<Address>> for AddressesFilter { | |
impl AddressesFilter { | ||
/// Returns true if address matches one of the searched addresses. | ||
pub fn matches(&self, address: &Address) -> bool { | ||
self.matches_all() || self.list.contains(address) | ||
} | ||
self.matches_all() || self.stricly_matches(address) | ||
} | ||
|
||
/// Returns true if address matches at least one of the searched addresses. | ||
pub fn stricly_matches(&self, address: &Address) -> bool { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. strictly* There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Arh... |
||
self.list.contains(address) | ||
} | ||
|
||
/// Returns true if this address filter matches everything. | ||
pub fn matches_all(&self) -> bool { | ||
|
@@ -127,7 +132,7 @@ impl Filter { | |
}; | ||
|
||
action || match trace.result { | ||
Res::Create(ref create) => self.to_address.matches(&create.address), | ||
Res::Create(ref create) => self.to_address.stricly_matches(&create.address), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Couldn't we replace L124 with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes that would be totally equivalent. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. However the |
||
_ => false | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually the issue here is that this whole line is using spaces instead of tabs for indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep just saw that