File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -98,4 +98,8 @@ module pyth::error {
98
98
public fun invalid_attestation_magic_value (): u64 {
99
99
error::invalid_argument (24 )
100
100
}
101
+
102
+ public fun data_source_emitter_address_and_chain_ids_different_lengths (): u64 {
103
+ error::invalid_argument (25 )
104
+ }
101
105
}
Original file line number Diff line number Diff line change @@ -74,6 +74,10 @@ module pyth::pyth {
74
74
fun parse_data_sources (
75
75
emitter_chain_ids: vector <u64 >,
76
76
emitter_addresses: vector <vector <u8 >>): vector <DataSource > {
77
+
78
+ assert !(vector ::length (&emitter_chain_ids) == vector ::length (&emitter_addresses),
79
+ error::data_source_emitter_address_and_chain_ids_different_lengths ());
80
+
77
81
let sources = vector ::empty ();
78
82
let i = 0 ;
79
83
while (i < vector ::length (&emitter_chain_ids)) {
You can’t perform that action at this time.
0 commit comments