From 2685c59debf4f1fefce8b2fccade3294da8d6bfe Mon Sep 17 00:00:00 2001 From: Alfred Hodler Date: Wed, 22 May 2024 05:28:47 +0000 Subject: [PATCH] Version 0.2.2 - fine tune network reactor parameters - add build script --- .github/workflows/rust.yml | 34 ++++++++++++++++++++++++++++++++++ Cargo.lock | 4 ++-- README.md | 1 + pushtx-cli/Cargo.toml | 4 ++-- pushtx/Cargo.toml | 2 +- pushtx/src/p2p/client.rs | 9 ++++++++- 6 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..2aafc3b --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,34 @@ +name: Build + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build + run: cargo build --verbose + - name: Run tests + run: RUST_LOG=trace cargo test --all-features --verbose + + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Format + run: cargo fmt --all --check + + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run Clippy + run: cargo clippy diff --git a/Cargo.lock b/Cargo.lock index 7c13ebe..41e75a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -392,7 +392,7 @@ dependencies = [ [[package]] name = "pushtx" -version = "0.2.0" +version = "0.2.2" dependencies = [ "bitcoin", "crossbeam-channel", @@ -408,7 +408,7 @@ dependencies = [ [[package]] name = "pushtx-cli" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", "clap", diff --git a/README.md b/README.md index b210c41..9f98161 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![Documentation](https://img.shields.io/docsrs/pushtx)](https://docs.rs/pushtx/latest/pushtx/) [![Crates.io](https://img.shields.io/crates/v/pushtx.svg)](https://crates.io/crates/pushtx) [![License](https://img.shields.io/crates/l/pushtx.svg)](https://github.com/alfred-hodler/pushtx/blob/master/LICENSE) +[![Test Status](https://github.com/alfred-hodler/pushtx/actions/workflows/rust.yml/badge.svg?branch=master)](https://github.com/alfred-hodler/pushtx/actions) ## Privacy-focused Bitcoin Transaction Broadcaster diff --git a/pushtx-cli/Cargo.toml b/pushtx-cli/Cargo.toml index cb6f6a3..87a8591 100644 --- a/pushtx-cli/Cargo.toml +++ b/pushtx-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pushtx-cli" -version = "0.2.1" +version = "0.2.2" edition = "2021" authors = ["Alfred Hodler "] license = "MIT" @@ -18,5 +18,5 @@ anyhow = "1.0.86" clap = { version = "4.5.4", features = ["derive"] } env_logger = "0.11.3" log = "0.4.20" -pushtx = { version = "0.2.0", path = "../pushtx" } +pushtx = { version = "0.2.2", path = "../pushtx" } thiserror = "1.0.61" diff --git a/pushtx/Cargo.toml b/pushtx/Cargo.toml index d022976..c5eb3cc 100644 --- a/pushtx/Cargo.toml +++ b/pushtx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pushtx" -version = "0.2.0" +version = "0.2.2" edition = "2021" authors = ["Alfred Hodler "] license = "MIT" diff --git a/pushtx/src/p2p/client.rs b/pushtx/src/p2p/client.rs index 64f44e4..aaf85ef 100644 --- a/pushtx/src/p2p/client.rs +++ b/pushtx/src/p2p/client.rs @@ -16,7 +16,14 @@ pub fn client(socks_proxy: Option, network: crate::Network) -> Clien let (handle, join_handle) = match socks_proxy { Some(proxy) => { let (reactor, handle) = peerlink::Reactor::with_connector( - Default::default(), + peerlink::Config { + stream_config: peerlink::StreamConfig { + tx_buf_min_size: 4096, + ..Default::default() + }, + receive_buffer_size: 32 * 1024, + ..Default::default() + }, peerlink::connector::Socks5Connector { proxy, // random proxy credentials to get an isolated Tor circuit