Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/serai-dex/serai into imp…
Browse files Browse the repository at this point in the history
…rove-provided-handling
  • Loading branch information
akildemir committed Sep 26, 2023
2 parents 98e8b99 + 2508633 commit d083b1e
Show file tree
Hide file tree
Showing 63 changed files with 4,429 additions and 1,986 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/mini-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: mini/ Tests

on:
push:
branches:
- develop
paths:
- "mini/**"

pull_request:
paths:
- "mini/**"

workflow_dispatch:

jobs:
test-common:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac

- name: Test Dependencies
uses: ./.github/actions/test-dependencies
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Run Tests
run: GITHUB_CI=true RUST_BACKTRACE=1 cargo test --all-features -p mini-serai
89 changes: 85 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ members = [

"substrate/client",

"mini",

"tests/no-std",

"tests/docker",
Expand Down
5 changes: 5 additions & 0 deletions coins/bitcoin/src/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ impl ReceivedOutput {
self.offset
}

/// The Bitcoin output for this output.
pub fn output(&self) -> &TxOut {
&self.output
}

/// The outpoint for this output.
pub fn outpoint(&self) -> &OutPoint {
&self.outpoint
Expand Down
6 changes: 6 additions & 0 deletions coins/bitcoin/src/wallet/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ impl SignableTransaction {
self.needed_fee
}

/// Returns the fee this transaction will use.
pub fn fee(&self) -> u64 {
self.prevouts.iter().map(|prevout| prevout.value).sum::<u64>() -
self.tx.output.iter().map(|prevout| prevout.value).sum::<u64>()
}

/// Create a new SignableTransaction.
///
/// If a change address is specified, any leftover funds will be sent to it if the leftover funds
Expand Down
1 change: 0 additions & 1 deletion coordinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
async-trait = "0.1"
lazy_static = "1"

zeroize = "^1.5"
rand_core = "0.6"
Expand Down
Loading

0 comments on commit d083b1e

Please sign in to comment.