Skip to content

Commit 25c3a2b

Browse files
committed
bitcoin/signtx: remove pub from test functions
Not needed and not idiomatic.
1 parent dea7eff commit 25c3a2b

File tree

1 file changed

+10
-10
lines changed
  • src/rust/bitbox02-rust/src/hww/api/bitcoin

1 file changed

+10
-10
lines changed

src/rust/bitbox02-rust/src/hww/api/bitcoin/signtx.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ mod tests {
16591659
}
16601660

16611661
#[test]
1662-
pub fn test_sign_init_fail() {
1662+
fn test_sign_init_fail() {
16631663
*crate::hww::MOCK_NEXT_REQUEST.0.borrow_mut() = None;
16641664

16651665
let init_req_valid = pb::BtcSignInitRequest {
@@ -1895,7 +1895,7 @@ mod tests {
18951895
}
18961896

18971897
#[test]
1898-
pub fn test_process() {
1898+
fn test_process() {
18991899
static mut UI_COUNTER: u32 = 0;
19001900
static mut PREVTX_REQUESTED: u32 = 0;
19011901

@@ -2042,7 +2042,7 @@ mod tests {
20422042

20432043
/// Test that receiving an unexpected message from the host results in an invalid state error.
20442044
#[test]
2045-
pub fn test_invalid_state() {
2045+
fn test_invalid_state() {
20462046
let transaction =
20472047
alloc::rc::Rc::new(core::cell::RefCell::new(Transaction::new(pb::BtcCoin::Btc)));
20482048
mock_unlocked();
@@ -2066,7 +2066,7 @@ mod tests {
20662066

20672067
/// Test signing if all inputs are of type P2WPKH-P2SH.
20682068
#[test]
2069-
pub fn test_script_type_p2wpkh_p2sh() {
2069+
fn test_script_type_p2wpkh_p2sh() {
20702070
let transaction =
20712071
alloc::rc::Rc::new(core::cell::RefCell::new(Transaction::new(pb::BtcCoin::Btc)));
20722072
for input in transaction.borrow_mut().inputs.iter_mut() {
@@ -2101,7 +2101,7 @@ mod tests {
21012101

21022102
/// Test signing if all inputs are of type P2TR.
21032103
#[test]
2104-
pub fn test_script_type_p2tr() {
2104+
fn test_script_type_p2tr() {
21052105
let transaction =
21062106
alloc::rc::Rc::new(core::cell::RefCell::new(Transaction::new(pb::BtcCoin::Btc)));
21072107
for input in transaction.borrow_mut().inputs.iter_mut() {
@@ -2150,7 +2150,7 @@ mod tests {
21502150
/// Test signing if with mixed inputs, one of them being taproot. Previous transactions of all
21512151
/// inputs should be streamed in this case.
21522152
#[test]
2153-
pub fn test_script_type_p2tr_mixed() {
2153+
fn test_script_type_p2tr_mixed() {
21542154
let transaction =
21552155
alloc::rc::Rc::new(core::cell::RefCell::new(Transaction::new(pb::BtcCoin::Btc)));
21562156
transaction.borrow_mut().inputs[0].input.script_config_index = 1;
@@ -2191,7 +2191,7 @@ mod tests {
21912191
/// receive addresses at these indices (to mitigate ransom attacks), we should still be able to
21922192
/// spend them.
21932193
#[test]
2194-
pub fn test_spend_high_address_index() {
2194+
fn test_spend_high_address_index() {
21952195
let transaction =
21962196
alloc::rc::Rc::new(core::cell::RefCell::new(Transaction::new(pb::BtcCoin::Btc)));
21972197
transaction.borrow_mut().inputs[0].input.keypath[4] = 100000;
@@ -2208,7 +2208,7 @@ mod tests {
22082208

22092209
/// Test invalid input cases.
22102210
#[test]
2211-
pub fn test_invalid_input() {
2211+
fn test_invalid_input() {
22122212
enum TestCase {
22132213
// all inputs should be the same coin type.
22142214
WrongCoinInput,
@@ -2319,7 +2319,7 @@ mod tests {
23192319

23202320
/// Test signing with mixed input types.
23212321
#[test]
2322-
pub fn test_mixed_inputs() {
2322+
fn test_mixed_inputs() {
23232323
let transaction =
23242324
alloc::rc::Rc::new(core::cell::RefCell::new(Transaction::new(pb::BtcCoin::Btc)));
23252325
transaction.borrow_mut().inputs[0].input.script_config_index = 1;
@@ -3588,7 +3588,7 @@ mod tests {
35883588
}
35893589

35903590
#[test]
3591-
pub fn test_payment_request() {
3591+
fn test_payment_request() {
35923592
let transaction =
35933593
alloc::rc::Rc::new(core::cell::RefCell::new(Transaction::new(pb::BtcCoin::Btc)));
35943594

0 commit comments

Comments
 (0)