Skip to content

Commit

Permalink
humility ibc black-box should skip empty events
Browse files Browse the repository at this point in the history
  • Loading branch information
citrus-it committed Nov 22, 2023
1 parent 67d932e commit 006d2fa
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name = "humility"
#
# Be sure to check in and push all of the files that change. Happy versioning!
#
version = "0.10.34"
version = "0.10.35"
authors = ["Bryan Cantrill <bryan@oxide.computer>"]
edition = "2018"
license = "MPL-2.0"
Expand Down
10 changes: 10 additions & 0 deletions cmd/ibc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,16 @@ impl<'a> IbcHandler<'a> {
}

fn print_event(&self, e: IbcEvent, verbose: bool, vout_mode: u8) {
// In that case that a log contains no entries, the newest event index
// reported will be the lowest slot for the log type, which will be
// empty. Reading an empty event will return 0xFF in all bytes.
if e.timestamp.get() == u32::MAX
&& e.event_id.get() == u16::MAX
&& e.status_word.get() == u16::MAX
{
println!(" EMPTY");
return;
}
println!(
" TIMESTAMP {:#010x} = {}",
e.timestamp.get(),
Expand Down
4 changes: 2 additions & 2 deletions tests/cmd/chip.trycmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For more information try --help

```
$ humility --chip this-can-be-anything -V
humility 0.10.34
humility 0.10.35

```

Expand All @@ -28,7 +28,7 @@ For more information try --help

```
$ humility -c apx432 -V
humility 0.10.34
humility 0.10.35

```

4 changes: 2 additions & 2 deletions tests/cmd/version.trycmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Long version flag:

```
$ humility --version
humility 0.10.34
humility 0.10.35

```

Short version flag:

```
$ humility -V
humility 0.10.34
humility 0.10.35

```

0 comments on commit 006d2fa

Please sign in to comment.