From f3addf0f07699973ce41fc85897e5a190da43a37 Mon Sep 17 00:00:00 2001 From: SW van Heerden Date: Mon, 24 Jun 2024 08:58:25 +0200 Subject: [PATCH 1/4] fix integration tests --- .../src/transactions/transaction_components/encrypted_data.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_layer/core/src/transactions/transaction_components/encrypted_data.rs b/base_layer/core/src/transactions/transaction_components/encrypted_data.rs index 651aed6983..678a9af912 100644 --- a/base_layer/core/src/transactions/transaction_components/encrypted_data.rs +++ b/base_layer/core/src/transactions/transaction_components/encrypted_data.rs @@ -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], } } } From 7e9ced49ca41592059e0e4fee2db0a275f63fe68 Mon Sep 17 00:00:00 2001 From: SW van Heerden Date: Mon, 24 Jun 2024 09:03:48 +0200 Subject: [PATCH 2/4] fmt --- .../src/transactions/transaction_components/encrypted_data.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_layer/core/src/transactions/transaction_components/encrypted_data.rs b/base_layer/core/src/transactions/transaction_components/encrypted_data.rs index 678a9af912..c03ef7bc27 100644 --- a/base_layer/core/src/transactions/transaction_components/encrypted_data.rs +++ b/base_layer/core/src/transactions/transaction_components/encrypted_data.rs @@ -294,7 +294,7 @@ impl Hex for EncryptedData { impl Default for EncryptedData { fn default() -> Self { Self { - data: vec![0;STATIC_ENCRYPTED_DATA_SIZE_TOTAL], + data: vec![0; STATIC_ENCRYPTED_DATA_SIZE_TOTAL], } } } From 24d09ef4eae1e1e07ae3700962dffc25fd63cfea Mon Sep 17 00:00:00 2001 From: SW van Heerden Date: Mon, 24 Jun 2024 09:47:06 +0200 Subject: [PATCH 3/4] fix cucumber --- integration_tests/src/ffi/ffi_import.rs | 1 + integration_tests/src/ffi/wallet.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/integration_tests/src/ffi/ffi_import.rs b/integration_tests/src/ffi/ffi_import.rs index 01f7405477..6312fab4f6 100644 --- a/integration_tests/src/ffi/ffi_import.rs +++ b/integration_tests/src/ffi/ffi_import.rs @@ -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( diff --git a/integration_tests/src/ffi/wallet.rs b/integration_tests/src/ffi/wallet.rs index 45f28c51a4..d6bbbc9bb3 100644 --- a/integration_tests/src/ffi/wallet.rs +++ b/integration_tests/src/ffi/wallet.rs @@ -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 { From 2d4a9b24150ae5d0ab05f025a342395af93a25a3 Mon Sep 17 00:00:00 2001 From: SW van Heerden Date: Mon, 24 Jun 2024 13:49:43 +0200 Subject: [PATCH 4/4] fix test --- integration_tests/tests/features/BlockTemplate.feature | 2 +- integration_tests/tests/steps/node_steps.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/integration_tests/tests/features/BlockTemplate.feature b/integration_tests/tests/features/BlockTemplate.feature index 12b4533c7f..a0eb409f1f 100644 --- a/integration_tests/tests/features/BlockTemplate.feature +++ b/integration_tests/tests/features/BlockTemplate.feature @@ -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 diff --git a/integration_tests/tests/steps/node_steps.rs b/integration_tests/tests/steps/node_steps.rs index ddc7bcb054..25631fcc33 100644 --- a/integration_tests/tests/steps/node_steps.rs +++ b/integration_tests/tests/steps/node_steps.rs @@ -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, @@ -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, @@ -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, @@ -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,