Skip to content

Commit

Permalink
fix: Fix JSON serialization of genesis key delegation (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed Aug 2, 2022
1 parent cf6a8c7 commit 34caaf9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/filters/fingerprint.rs
Expand Up @@ -204,7 +204,7 @@ fn build_fingerprint(event: &Event, seed: u32) -> Result<String, Error> {
.with_prefix("reti")
.append_optional(&event.context.tx_hash)?
.append_optional_to_string(&event.context.certificate_idx)?,
EventData::GenesisKeyDelegation => b
EventData::GenesisKeyDelegation { .. } => b
.with_slot(&event.context.slot)
.with_prefix("gene")
.append_optional(&event.context.tx_hash)?
Expand Down
3 changes: 1 addition & 2 deletions src/mapper/map.rs
Expand Up @@ -358,9 +358,8 @@ impl EventWriter {
},
}
}

// TODO: not likely, leaving for later
Certificate::GenesisKeyDelegation(..) => EventData::GenesisKeyDelegation,
Certificate::GenesisKeyDelegation(..) => EventData::GenesisKeyDelegation {},
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/model.rs
Expand Up @@ -338,7 +338,7 @@ pub enum EventData {
pool: String,
epoch: u64,
},
GenesisKeyDelegation,
GenesisKeyDelegation {},
MoveInstantaneousRewardsCert {
from_reserves: bool,
from_treasury: bool,
Expand Down
2 changes: 1 addition & 1 deletion src/sinks/terminal/format.rs
Expand Up @@ -266,7 +266,7 @@ impl LogLine {
source,
max_width,
},
EventData::GenesisKeyDelegation => LogLine {
EventData::GenesisKeyDelegation { } => LogLine {
prefix: "GENESIS",
color: Color::Magenta,
content: "{{ ... }}".to_string(),
Expand Down

0 comments on commit 34caaf9

Please sign in to comment.