s/id/hash in block events
This commit is contained in:
parent
bd39ab9365
commit
789a9df9f6
|
@ -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" => {
|
||||||
|
|
Loading…
Reference in New Issue