s/id/hash in block events

This commit is contained in:
Tyera Eulberg 2019-03-06 09:27:30 -07:00 committed by Grimes
parent bd39ab9365
commit 789a9df9f6
1 changed files with 3 additions and 3 deletions

View File

@ -112,7 +112,7 @@ where
blockhash: Hash, blockhash: Hash,
) -> Result<()> { ) -> Result<()> {
let payload = format!( let payload = format!(
r#"{{"dt":"{}","t":"block","s":{},"h":{},"l":"{:?}","id":"{:?}"}}"#, r#"{{"dt":"{}","t":"block","s":{},"h":{},"l":"{:?}","hash":"{:?}"}}"#,
Utc::now().to_rfc3339_opts(SecondsFormat::Nanos, true), Utc::now().to_rfc3339_opts(SecondsFormat::Nanos, true),
slot, slot,
tick_height, tick_height,
@ -209,8 +209,8 @@ mod test {
let item_type = json["t"].as_str().unwrap(); let item_type = json["t"].as_str().unwrap();
match item_type { match item_type {
"block" => { "block" => {
let id = json["id"].to_string(); let hash = json["hash"].to_string();
matched_blocks.insert(id); matched_blocks.insert(hash);
} }
"entry" => { "entry" => {