Merge bitcoindevkit/bdk-ffi#174: Add github workflows for audit, test and fmt

46850ed471 Add github issue templates and PR template (Steve Myers)
49da6fcbae Fix clippy warnings (Steve Myers)
075510d6e4 Add github workflows for audit, test and fmt (Steve Myers)

Pull request description:

  1. Copied and updated github workflows from BDK project.
  2. Fixed clippy warnings.
  3. Added github issue templates and PR templates from BDK project.

  Fixes #88

Top commit has no ACKs.

Tree-SHA512: 7aaca6be0f05d12f4561e165ebc45b52e40200b231b55326732756d45116f371f2da4c5d7cc590cd0af9450c344530f815a357fa979a34d0181efc2149ffccb3
This commit is contained in:
Steve Myers
2022-07-26 12:24:15 -07:00
6 changed files with 217 additions and 4 deletions

View File

@@ -586,7 +586,7 @@ impl TxBuilder {
}
}
if !&self.data.is_empty() {
tx_builder.add_data(&self.data.as_slice());
tx_builder.add_data(self.data.as_slice());
}
tx_builder
@@ -693,7 +693,7 @@ mod test {
.drain_wallet()
.drain_to(drain_to_address.clone());
//dbg!(&tx_builder);
assert_eq!(tx_builder.drain_wallet, true);
assert!(tx_builder.drain_wallet);
assert_eq!(tx_builder.drain_to, Some(drain_to_address));
let psbt = tx_builder.finish(&test_wallet).unwrap();
@@ -712,7 +712,7 @@ mod test {
.get(0)
.unwrap()
.value;
assert_eq!(input_value, 50_000 as u64);
assert_eq!(input_value, 50_000_u64);
// confirm one output to correct address with all sats - fee
assert_eq!(psbt.outputs.len(), 1);
@@ -732,6 +732,6 @@ mod test {
Address::from_str("tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt").unwrap()
);
let output_value = psbt.unsigned_tx.output.get(0).cloned().unwrap().value;
assert_eq!(output_value, 49_890 as u64); // input - fee
assert_eq!(output_value, 49_890_u64); // input - fee
}
}