diff --git a/Cargo.toml b/Cargo.toml index e6a41fc..2d930e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ futures-util = "0.3.31" gasket = { git = "https://github.com/construkts/gasket-rs.git", features = ["derive"] } hex = "0.4.3" itertools = "0.14.0" -pallas = { git = "https://github.com/txpipe/pallas.git", features = ["phase2", "wallet"] } +pallas = { git = "https://github.com/txpipe/pallas.git", tag = "v1.0.0-alpha.0", features = ["phase2", "wallet"] } protoc-wkt = "1.0.0" serde = { version = "1.0.217", features = ["derive"] } thiserror = "2.0.11" diff --git a/src/ledger/relay/mod.rs b/src/ledger/relay/mod.rs index 3b0ed20..42f0103 100644 --- a/src/ledger/relay/mod.rs +++ b/src/ledger/relay/mod.rs @@ -18,7 +18,7 @@ impl RelayDataAdapter for MockRelayDataAdapter { impl MockRelayDataAdapter { pub fn new() -> Self { - Self { + Self { mock_relays: vec![ "109.205.181.113:7900".to_string(), "194.163.149.210:6000".to_string(), @@ -30,8 +30,8 @@ impl MockRelayDataAdapter { "preview.leadstakepool.com:3002".to_string(), "relay.preview.cardanostakehouse.com:11000".to_string(), "130.162.231.122:6001".to_string(), - ] - } + ], + } } } @@ -41,7 +41,7 @@ mod tests { use tokio::test; /// A mock provider that returns a pre-defined list of string addresses, e.g., ["relay1:3001", "relay2:3002"]. - + #[test] async fn it_returns_mock_relays() { let provider = MockRelayDataAdapter { diff --git a/src/network/mock_ouroboros_tx_submit_server.rs b/src/network/mock_ouroboros_tx_submit_server.rs index 0ae7109..1db1376 100644 --- a/src/network/mock_ouroboros_tx_submit_server.rs +++ b/src/network/mock_ouroboros_tx_submit_server.rs @@ -205,10 +205,8 @@ mod broadcast_tests { use pallas::{ crypto::hash::Hash, ledger::primitives::{ - conway::{ - PostAlonzoTransactionOutput, PseudoTransactionOutput, TransactionBody, Tx, Value, - WitnessSet, - }, + babbage::GenTransactionOutput, + conway::{PostAlonzoTransactionOutput, TransactionBody, Tx, Value, WitnessSet}, Fragment, TransactionInput, }, }; @@ -354,12 +352,15 @@ mod broadcast_tests { index: i as u64, }; - let output = PseudoTransactionOutput::PostAlonzo(PostAlonzoTransactionOutput { - address: vec![100 + i as u8; 28].into(), - value: Value::Coin((i as u64 + 1) * 1_000_000), - datum_option: None, - script_ref: None, - }); + let output = GenTransactionOutput::PostAlonzo( + PostAlonzoTransactionOutput { + address: vec![100 + i as u8; 28].into(), + value: Value::Coin((i as u64 + 1) * 1_000_000), + datum_option: None, + script_ref: None, + } + .into(), + ); let tx = Tx { transaction_body: TransactionBody { @@ -383,7 +384,8 @@ mod broadcast_tests { proposal_procedures: None, treasury_value: None, donation: None, - }, + } + .into(), transaction_witness_set: WitnessSet { vkeywitness: None, native_script: None, @@ -393,7 +395,8 @@ mod broadcast_tests { plutus_v3_script: None, plutus_data: None, redeemer: None, - }, + } + .into(), success: true, auxiliary_data: None.into(), }; diff --git a/src/network/mod.rs b/src/network/mod.rs index 784ebf2..f896bd8 100644 --- a/src/network/mod.rs +++ b/src/network/mod.rs @@ -1,4 +1,4 @@ pub mod mempool; -pub mod peer_manager; +pub mod mock_ouroboros_tx_submit_server; pub mod peer; -pub mod mock_ouroboros_tx_submit_server; \ No newline at end of file +pub mod peer_manager; diff --git a/src/pipeline/peer_discovery/mod.rs b/src/pipeline/peer_discovery/mod.rs index 661fc4b..97cec97 100644 --- a/src/pipeline/peer_discovery/mod.rs +++ b/src/pipeline/peer_discovery/mod.rs @@ -6,7 +6,13 @@ use thiserror::Error; use tokio::time::sleep; use tracing::info; -use crate::{ledger::relay::RelayDataAdapter, network::{peer::PeerError, peer_manager::{PeerManager, PeerManagerConfig, PeerManagerError}}}; +use crate::{ + ledger::relay::RelayDataAdapter, + network::{ + peer::PeerError, + peer_manager::{PeerManager, PeerManagerConfig, PeerManagerError}, + }, +}; #[derive(Error, Debug)] pub enum FanoutError {