Skip to content
Open
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
14 changes: 13 additions & 1 deletion .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,19 @@ jobs:
- name: "Run integration tests"
env:
BITCOIND_DOWNLOAD_DIR: ${{ github.workspace }}/.cache/corepc/bitcoind
run: cd integration_test && cargo test --features=${{ matrix.version }},download
run: |
set -o pipefail
test_output="${{ runner.temp }}/integration-test-${{ matrix.version }}.out"
Comment thread
jamillambert marked this conversation as resolved.
cd integration_test
cargo test --features=${{ matrix.version }},download 2>&1 | tee "$test_output"
- name: "Verify integration test coverage"
run: |
test_output="${{ runner.temp }}/integration-test-${{ matrix.version }}.out"
verify_version="${{ matrix.version }}"
verify_version="${verify_version#0_}"
verify_version="${verify_version%%_*}"
cd verify
cargo run -- --tests "$test_output" "$verify_version"

# The jobs below copied from electrsd repo during import. Not too
# much further thought given to it.
Expand Down
26 changes: 21 additions & 5 deletions integration_test/tests/raw_transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -717,10 +717,26 @@ fn raw_transactions__get_private_broadcast_info__modelled() {

#[test]
#[cfg(not(feature = "v30_and_below"))]
fn raw_transactions__abort_private_broadcast() {
let node = BitcoinD::with_wallet(Wallet::None, &[]);
fn raw_transactions__abort_private_broadcast__modelled() {
let node =
BitcoinD::with_wallet(Wallet::Default, &["-privatebroadcast=1", "-proxy=127.0.0.1:1"]);
node.fund_wallet();

// Create a signed transaction and send it via private broadcast.
let tx = create_a_raw_transaction(&node);
let signed = node
.client
.sign_raw_transaction_with_wallet(&tx)
.expect("signrawtransactionwithwallet")
.into_model()
.expect("SignRawTransaction into model")
.tx;
let send = node.client.send_raw_transaction(&signed).expect("sendrawtransaction");

let json: AbortPrivateBroadcast =
node.client.abort_private_broadcast(&send.0).expect("abortprivatebroadcast");
let model: Result<mtype::AbortPrivateBroadcast, encode::FromHexError> = json.into_model();
let abort = model.unwrap();

// Aborting a transaction that is not in the private broadcast queue returns an error in regtest.
let txid = "0000000000000000000000000000000000000000000000000000000000000001";
assert!(node.client.abort_private_broadcast(txid).is_err());
assert_eq!(abort.removed_transactions, &[signed]);
}
2 changes: 1 addition & 1 deletion types/src/v26/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
//! | joinpsbts | version + model | |
//! | sendrawtransaction | version + model | |
//! | signrawtransactionwithkey | version + model | UNTESTED |
//! | submitpackage | version + model | |
//! | submitpackage | version + model | UNTESTED |
//! | testmempoolaccept | version + model | |
//! | utxoupdatepsbt | version + model | |
//!
Expand Down
Loading