Skip to content

Commit

Permalink
chore: fix integration tests (#6378)
Browse files Browse the repository at this point in the history
Description
---
fixes integration tests due to regression bug
  • Loading branch information
SWvheerden authored Jun 24, 2024
1 parent 43b2317 commit fbcc80c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl Hex for EncryptedData {
impl Default for EncryptedData {
fn default() -> Self {
Self {
data: Vec::with_capacity(STATIC_ENCRYPTED_DATA_SIZE_TOTAL),
data: vec![0; STATIC_ENCRYPTED_DATA_SIZE_TOTAL],
}
}
}
Expand Down
1 change: 1 addition & 0 deletions integration_tests/src/ffi/ffi_import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ extern "C" {
fee_per_gram: c_ulonglong,
message: *const c_char,
one_sided: bool,
payment_id_string: *const c_char,
error_out: *mut c_int,
) -> c_ulonglong;
pub fn wallet_get_fee_estimate(
Expand Down
1 change: 1 addition & 0 deletions integration_tests/src/ffi/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ impl Wallet {
fee_per_gram,
CString::new(message).unwrap().into_raw(),
one_sided,
CString::new("").unwrap().into_raw(),
&mut error,
);
if error > 0 {
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/tests/features/BlockTemplate.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Scenario: Verify UTXO and kernel MMR size in header
Then meddling with block template data from node SEED_A is not allowed

@critical
Scenario: Verify gprc cna create block with more than 1 coinbase
Scenario: Verify gprc can create block with more than 1 coinbase
Given I have a seed node SEED_A
When I have 1 base nodes connected to all seed nodes
Then generate a block with 2 coinbases from node SEED_A
Expand Down
8 changes: 4 additions & 4 deletions integration_tests/tests/steps/node_steps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ async fn generate_block_with_2_coinbases(world: &mut TariWorld, node: String) {
new_template: Some(block_template),
coinbases: vec![
NewBlockCoinbase {
address: TariAddress::from_hex("30a815df7b8d7f653ce3252f08a21d570b1ac44958cb4d7af0e0ef124f89b11943")
address: TariAddress::from_hex("2603025d6849dd3dcc42c59b4bbfed335a438a0538f0d46a12f5142fcded0159b34d42f59c53d2e9a9fa7b90d2baec1455a7ab1144c49d69599c52b8bd8e0bb3e32292")
.unwrap()
.to_hex(),
value: amount - 1000,
Expand All @@ -762,7 +762,7 @@ async fn generate_block_with_2_coinbases(world: &mut TariWorld, node: String) {
coinbase_extra: Vec::new(),
},
NewBlockCoinbase {
address: TariAddress::from_hex("3e596f98f6904f0fc1c8685e2274bd8b2c445d5dac284a9398d09a0e9a760436d0")
address: TariAddress::from_hex("2603cc911148f1a78fbf721e27c80d1717dcfe1e6750ffe60af2047bff1d4f066575e84190b0bc7e939d1998c6bbd81c8dfd654abaa7ffae6af295f1077124b5885751")
.unwrap()
.to_hex(),
value: 1000,
Expand Down Expand Up @@ -809,7 +809,7 @@ async fn generate_block_with_2_as_single_request_coinbases(world: &mut TariWorld
max_weight: 0,
coinbases: vec![
NewBlockCoinbase {
address: TariAddress::from_hex("30a815df7b8d7f653ce3252f08a21d570b1ac44958cb4d7af0e0ef124f89b11943")
address: TariAddress::from_hex("2603025d6849dd3dcc42c59b4bbfed335a438a0538f0d46a12f5142fcded0159b34d42f59c53d2e9a9fa7b90d2baec1455a7ab1144c49d69599c52b8bd8e0bb3e32292")
.unwrap()
.to_hex(),
value: 1,
Expand All @@ -818,7 +818,7 @@ async fn generate_block_with_2_as_single_request_coinbases(world: &mut TariWorld
coinbase_extra: Vec::new(),
},
NewBlockCoinbase {
address: TariAddress::from_hex("3e596f98f6904f0fc1c8685e2274bd8b2c445d5dac284a9398d09a0e9a760436d0")
address: TariAddress::from_hex("2603cc911148f1a78fbf721e27c80d1717dcfe1e6750ffe60af2047bff1d4f066575e84190b0bc7e939d1998c6bbd81c8dfd654abaa7ffae6af295f1077124b5885751")
.unwrap()
.to_hex(),
value: 2,
Expand Down

0 comments on commit fbcc80c

Please sign in to comment.