Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Aug 1, 2023
1 parent f17e07e commit 627ea8c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cli/src/oracle/commands/listen_to_exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn count_exchange_rate_update_events(api: &ParentchainApi, duration: Duratio
"ExchangeRateUpdated: TRADING_PAIR : {}, SRC : {}, VALUE :{:?}",
trading_pair, data_source, exchange_rate
);
}
},
_ => trace!("ignoring teeracle event: {:?}", event),
}
}
Expand Down
12 changes: 9 additions & 3 deletions cli/src/oracle/commands/listen_to_oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,17 @@ fn report_event_count(event_records: Vec<Event>) -> EventCount {
info!("received event {:?}", event_record.event);
if let RuntimeEvent::Teeracle(event) = &event_record.event {
match &event {
my_node_runtime::pallet_teeracle::Event::OracleUpdated{oracle_data_name, data_source } => {
my_node_runtime::pallet_teeracle::Event::OracleUpdated {
oracle_data_name,
data_source,
} => {
count += 1;
debug!("Received OracleUpdated event");
println!("OracleUpdated: ORACLE_NAME : {}, SRC : {}", oracle_data_name, data_source);
}
println!(
"OracleUpdated: ORACLE_NAME : {}, SRC : {}",
oracle_data_name, data_source
);
},
// Can just remove this and ignore handling this case
_ => debug!("ignoring teeracle event: {:?}", event),
}
Expand Down
8 changes: 4 additions & 4 deletions service/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -704,31 +704,31 @@ fn print_events(events: Vec<Event>) {
println!(" Data source: {}", data_source);
println!(" trading pair: {}", trading_pair);
println!(" Exchange rate: {:?}", exchange_rate);
}
},
my_node_runtime::pallet_teeracle::Event::ExchangeRateDeleted {
data_source,
trading_pair,
} => {
println!("[+] Received ExchangeRateDeleted event");
println!(" Data source: {}", data_source);
println!(" trading pair: {}", trading_pair);
}
},
my_node_runtime::pallet_teeracle::Event::AddedToWhitelist {
data_source,
enclave_fingerprint,
} => {
println!("[+] Received AddedToWhitelist event");
println!(" Data source: {}", data_source);
println!(" fingerprint: {:?}", enclave_fingerprint);
}
},
my_node_runtime::pallet_teeracle::Event::RemovedFromWhitelist {
data_source,
enclave_fingerprint,
} => {
println!("[+] Received RemovedFromWhitelist event");
println!(" Data source: {}", data_source);
println!(" fingerprint: {:?}", enclave_fingerprint);
}
},
_ => {
trace!("Ignoring unsupported pallet_teeracle event");
},
Expand Down
2 changes: 1 addition & 1 deletion sidechain/state/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

//! Implement the sidechain state traits.

use core::fmt::Debug;
use crate::{Error, SidechainState, StateUpdate};
use codec::{Decode, Encode};
use core::fmt::Debug;
use frame_support::ensure;
use itp_sgx_externalities::{SgxExternalitiesTrait, StateHash};
use itp_storage::keys::storage_value_key;
Expand Down

0 comments on commit 627ea8c

Please sign in to comment.