Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions src/ledger/relay/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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(),
]
}
],
}
}
}

Expand All @@ -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 {
Expand Down
27 changes: 15 additions & 12 deletions src/network/mock_ouroboros_tx_submit_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};
Expand Down Expand Up @@ -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 {
Expand All @@ -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,
Expand All @@ -393,7 +395,8 @@ mod broadcast_tests {
plutus_v3_script: None,
plutus_data: None,
redeemer: None,
},
}
.into(),
success: true,
auxiliary_data: None.into(),
};
Expand Down
4 changes: 2 additions & 2 deletions src/network/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
pub mod peer_manager;
8 changes: 7 additions & 1 deletion src/pipeline/peer_discovery/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading