From dedd257979bbb86b6b4e82f005c350eabcb3883e Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Fri, 12 Apr 2024 19:47:04 +0100 Subject: [PATCH 1/4] fix: comment --- program/rust/src/tests/test_upd_price_no_fail_on_error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/rust/src/tests/test_upd_price_no_fail_on_error.rs b/program/rust/src/tests/test_upd_price_no_fail_on_error.rs index 1d175d8b..e3f38787 100644 --- a/program/rust/src/tests/test_upd_price_no_fail_on_error.rs +++ b/program/rust/src/tests/test_upd_price_no_fail_on_error.rs @@ -123,7 +123,7 @@ fn test_upd_price_no_fail_on_error_no_fail_on_error() { assert_eq!(price_data.agg_.status_, PC_STATUS_TRADING); } - // Invalid updates, such as publishing an update for the current slot, + // Invalid updates, such as publishing a price component with a pub_slot_ that's lower than the price component stored in the program // should still fail silently and have no effect. // Check that the normal upd_price fails From 7fd9c3596d3fd4a7f062f98080e31d7ff09a14d0 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Fri, 12 Apr 2024 20:56:00 +0100 Subject: [PATCH 2/4] Go --- program/rust/src/tests/test_upd_price.rs | 2 +- program/rust/src/tests/test_upd_price_no_fail_on_error.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/program/rust/src/tests/test_upd_price.rs b/program/rust/src/tests/test_upd_price.rs index d370030f..71c6b38d 100644 --- a/program/rust/src/tests/test_upd_price.rs +++ b/program/rust/src/tests/test_upd_price.rs @@ -93,7 +93,7 @@ fn test_upd_price() { assert_eq!(price_data.price_cumulative.num_down_slots, 0); } - // add some prices for current slot - get rejected + // add some prices for a slot that is not greater than the current published slot populate_instruction(&mut instruction_data, 43, 2, 1); assert_eq!( diff --git a/program/rust/src/tests/test_upd_price_no_fail_on_error.rs b/program/rust/src/tests/test_upd_price_no_fail_on_error.rs index e3f38787..3d0998eb 100644 --- a/program/rust/src/tests/test_upd_price_no_fail_on_error.rs +++ b/program/rust/src/tests/test_upd_price_no_fail_on_error.rs @@ -123,7 +123,7 @@ fn test_upd_price_no_fail_on_error_no_fail_on_error() { assert_eq!(price_data.agg_.status_, PC_STATUS_TRADING); } - // Invalid updates, such as publishing a price component with a pub_slot_ that's lower than the price component stored in the program + // Invalid updates, such as publishing a price component with a pub_slot_ that's lower or equal than the price component stored in the program // should still fail silently and have no effect. // Check that the normal upd_price fails From ea6263e057adb8b27827d09ae1f5f9e2468adb94 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Tue, 16 Apr 2024 13:47:10 +0100 Subject: [PATCH 3/4] Go --- program/rust/src/tests/test_upd_price.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/rust/src/tests/test_upd_price.rs b/program/rust/src/tests/test_upd_price.rs index 71c6b38d..54198511 100644 --- a/program/rust/src/tests/test_upd_price.rs +++ b/program/rust/src/tests/test_upd_price.rs @@ -93,7 +93,7 @@ fn test_upd_price() { assert_eq!(price_data.price_cumulative.num_down_slots, 0); } - // add some prices for a slot that is not greater than the current published slot + // a publisher's component pub_slot_ has to be strictly increasing -- get rejected populate_instruction(&mut instruction_data, 43, 2, 1); assert_eq!( From ccf8f04eb4cf37d40bf2caac06c8e6ec5268362e Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Fri, 12 Apr 2024 21:05:05 +0100 Subject: [PATCH 4/4] Go --- program/rust/src/tests/test_upd_price_no_fail_on_error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/rust/src/tests/test_upd_price_no_fail_on_error.rs b/program/rust/src/tests/test_upd_price_no_fail_on_error.rs index 3d0998eb..daf8d715 100644 --- a/program/rust/src/tests/test_upd_price_no_fail_on_error.rs +++ b/program/rust/src/tests/test_upd_price_no_fail_on_error.rs @@ -123,7 +123,7 @@ fn test_upd_price_no_fail_on_error_no_fail_on_error() { assert_eq!(price_data.agg_.status_, PC_STATUS_TRADING); } - // Invalid updates, such as publishing a price component with a pub_slot_ that's lower or equal than the price component stored in the program + // Invalid updates, such as publishing a price update with a pub_slot_ that's lower or equal than one that's already been published (by the same publisher), // should still fail silently and have no effect. // Check that the normal upd_price fails