Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
fix: update smart contract event (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
atanmarko authored Feb 23, 2024
1 parent 53328ac commit f995859
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion crates/topos-metrics/src/api.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use prometheus::{self, register_int_counter_with_registry, IntCounter};
use prometheus::{register_int_counter_with_registry, IntCounter};

use lazy_static::lazy_static;

Expand Down
3 changes: 1 addition & 2 deletions crates/topos-metrics/src/double_echo.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use prometheus::{
self, register_int_counter_with_registry, register_int_gauge_with_registry, IntCounter,
IntGauge,
register_int_counter_with_registry, register_int_gauge_with_registry, IntCounter, IntGauge,
};

use lazy_static::lazy_static;
Expand Down
2 changes: 1 addition & 1 deletion crates/topos-metrics/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use prometheus::{
self, register_histogram_with_registry, register_int_counter_with_registry, Encoder, Histogram,
register_histogram_with_registry, register_int_counter_with_registry, Encoder, Histogram,
IntCounter, Registry, TextEncoder,
};

Expand Down
2 changes: 1 addition & 1 deletion crates/topos-metrics/src/p2p.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use prometheus::{
self, register_histogram_with_registry, register_int_counter_vec_with_registry,
register_histogram_with_registry, register_int_counter_vec_with_registry,
register_int_counter_with_registry, Histogram, IntCounter, IntCounterVec,
};

Expand Down
2 changes: 1 addition & 1 deletion crates/topos-metrics/src/storage.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use prometheus::{
self, register_histogram_with_registry, register_int_counter_with_registry,
register_histogram_with_registry, register_int_counter_with_registry,
register_int_gauge_with_registry, Histogram, IntCounter, IntGauge,
};

Expand Down
6 changes: 5 additions & 1 deletion crates/topos-sequencer-subnet-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ pub type Hash = String;
/// Event collected from the sending subnet
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum SubnetEvent {
CrossSubnetMessageSent { target_subnet_id: SubnetId },
CrossSubnetMessageSent {
target_subnet_id: SubnetId,
source_subnet_id: SubnetId,
nonce: u64,
},
}

#[derive(Default, Debug, Clone, Serialize, Deserialize)]
Expand Down
4 changes: 3 additions & 1 deletion crates/topos-sequencer-subnet-client/src/subnet_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ pub(crate) async fn get_block_events(
);
result.push(SubnetEvent::CrossSubnetMessageSent {
target_subnet_id: f.target_subnet_id.into(),
source_subnet_id: f.source_subnet_id.into(),
nonce: f.nonce.as_u64(),
})
} else {
// Ignored for now other events Upgraded, CertStored
// Ignored other events until we need them
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/topos-sequencer-subnet-runtime/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use tokio::sync::{mpsc, oneshot};
use tokio::time::Duration;
use topos_core::api::grpc::checkpoints::TargetStreamPosition;
use topos_core::uci::{Certificate, CertificateId, SubnetId};
use topos_sequencer_subnet_client::{self, BlockInfo, SubnetClient, SubnetClientListener};
use topos_sequencer_subnet_client::{BlockInfo, SubnetClient, SubnetClientListener};
use tracing::{debug, error, field, info, info_span, instrument, warn, Instrument, Span};
use tracing_opentelemetry::OpenTelemetrySpanExt;

Expand Down
1 change: 0 additions & 1 deletion crates/topos-tce-api/src/graphql/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use async_graphql::{EmptyMutation, Schema};
use async_graphql_axum::GraphQLSubscription;
use axum::{extract::Extension, routing::get, Router, Server};
use http::{header, Method};
use hyper;
use tokio::sync::mpsc;
use tower_http::cors::{Any, CorsLayer};

Expand Down
1 change: 0 additions & 1 deletion crates/topos-tce-api/src/stream/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ pub(crate) enum HandshakeError {
mod tests {
use test_log::test;
use tokio::sync::oneshot;
use uuid::Uuid;

use super::*;

Expand Down
3 changes: 0 additions & 3 deletions crates/topos-tce-broadcast/src/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
use crate::double_echo::*;
use crate::*;
use rstest::*;
use std::collections::HashSet;
use std::str::FromStr;
use std::time::Duration;
use tokio::sync::mpsc::Receiver;
use topos_config::tce::broadcast::ReliableBroadcastParams;
use topos_crypto::messages::MessageSigner;
use topos_test_sdk::constants::*;
use topos_test_sdk::storage::create_validator_store;

Expand Down

0 comments on commit f995859

Please sign in to comment.