Skip to content

Commit bd5b1d9

Browse files
authored
add checks (dmnd-pool#65)
1 parent 43d18da commit bd5b1d9

2 files changed

Lines changed: 38 additions & 1 deletion

File tree

.github/workflows/checks.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Rust CI Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
jobs:
13+
check:
14+
name: Run Checks (fmt, clippy, test)
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Rust toolchain
21+
uses: dtolnay/rust-toolchain@stable
22+
with:
23+
components: rustfmt, clippy
24+
25+
- name: Run cargo fmt
26+
run: cargo fmt --all -- --check
27+
28+
- name: Run cargo clippy
29+
run: cargo clippy --all-targets --all-features -- -D warnings
30+
31+
- name: Run cargo test
32+
run: cargo test --all-features

src/translator/proxy/bridge.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,9 +667,14 @@ mod test {
667667
sequence: bitcoin::Sequence(0),
668668
witness: Witness::new(),
669669
};
670+
let now = std::time::SystemTime::now()
671+
.duration_since(std::time::UNIX_EPOCH)
672+
.unwrap()
673+
.as_secs() as u32;
674+
670675
let tx = bitcoin::Transaction {
671676
version: bitcoin::transaction::Version(1),
672-
lock_time: bitcoin::locktime::absolute::LockTime::from_time(0).unwrap(),
677+
lock_time: bitcoin::locktime::absolute::LockTime::from_time(now).unwrap(),
673678
input: vec![in_],
674679
output: vec![],
675680
};

0 commit comments

Comments
 (0)