Skip to content

Commit c2ab474

Browse files
authored
Remove add_mapping (#367)
1 parent 6c23b62 commit c2ab474

File tree

5 files changed

+1
-219
lines changed

5 files changed

+1
-219
lines changed

program/rust/src/processor.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use {
1313
},
1414
};
1515

16-
mod add_mapping;
1716
mod add_price;
1817
mod add_product;
1918
mod add_publisher;
@@ -29,7 +28,6 @@ mod upd_price;
2928
mod upd_product;
3029

3130
pub use {
32-
add_mapping::add_mapping,
3331
add_price::add_price,
3432
add_product::add_product,
3533
add_publisher::add_publisher,
@@ -60,7 +58,7 @@ pub fn process_instruction(
6058

6159
match load_command_header_checked(instruction_data)? {
6260
InitMapping => init_mapping(program_id, accounts, instruction_data),
63-
AddMapping => add_mapping(program_id, accounts, instruction_data),
61+
AddMapping => Err(OracleError::UnrecognizedInstruction.into()),
6462
AddProduct => add_product(program_id, accounts, instruction_data),
6563
UpdProduct => upd_product(program_id, accounts, instruction_data),
6664
AddPrice => add_price(program_id, accounts, instruction_data),

program/rust/src/processor/add_mapping.rs

Lines changed: 0 additions & 72 deletions
This file was deleted.

program/rust/src/tests/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
mod pyth_simulator;
2-
mod test_add_mapping;
32
mod test_add_price;
43
mod test_add_product;
54
mod test_add_publisher;

program/rust/src/tests/test_add_mapping.rs

Lines changed: 0 additions & 128 deletions
This file was deleted.

program/rust/src/tests/test_permission_migration.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use {
1616
DelPublisherArgs,
1717
InitPriceArgs,
1818
OracleCommand::{
19-
AddMapping,
2019
AddPrice,
2120
AddProduct,
2221
AddPublisher,
@@ -118,20 +117,6 @@ fn test_permission_migration() {
118117
)
119118
.unwrap();
120119

121-
assert_eq!(
122-
process_instruction(
123-
&program_id,
124-
&[
125-
attacker_account.clone(),
126-
mapping_account.clone(),
127-
next_mapping_account.clone(),
128-
permissions_account.clone()
129-
],
130-
bytes_of::<CommandHeader>(&AddMapping.into())
131-
),
132-
Err(OracleError::PermissionViolation.into())
133-
);
134-
135120
assert_eq!(
136121
process_instruction(
137122
&program_id,

0 commit comments

Comments
 (0)