File tree Expand file tree Collapse file tree 2 files changed +47
-12
lines changed Expand file tree Collapse file tree 2 files changed +47
-12
lines changed Original file line number Diff line number Diff line change
1
+ name : Check Pythnet
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches : [main]
7
+ jobs :
8
+ test :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - uses : actions-rs/toolchain@v1
13
+ with :
14
+ profile : minimal
15
+ toolchain : 1.60.0
16
+ components : clippy
17
+ override : true
18
+ - name : Install dependencies
19
+ run : |
20
+ sudo apt-get update
21
+ sudo apt-get install -y libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang cmake make libprotobuf-dev
22
+ - name : Check clippy
23
+ run : cargo clippy --bins --tests --examples -- --deny warnings
24
+ - name : Run tests
25
+ run : cargo test
26
+ format :
27
+ runs-on : ubuntu-latest
28
+ steps :
29
+ - uses : actions/checkout@v2
30
+ - uses : actions-rs/toolchain@v1
31
+ with :
32
+ profile : minimal
33
+ toolchain : nightly-2022-04-01
34
+ components : rustfmt
35
+ override : true
36
+ - name : Check formatting
37
+ run : cargo fmt -- --check
Original file line number Diff line number Diff line change @@ -3200,28 +3200,26 @@ fn process_account_indexes(matches: &ArgMatches) -> AccountSecondaryIndexes {
3200
3200
let exclude_keys = !account_indexes_exclude_keys. is_empty ( ) ;
3201
3201
let include_keys = !account_indexes_include_keys. is_empty ( ) ;
3202
3202
3203
- if include_keys {
3204
- if !account_indexes_include_keys. contains ( & * ORACLE_PID )
3203
+ if include_keys
3204
+ && ( !account_indexes_include_keys. contains ( & * ORACLE_PID )
3205
3205
|| !account_indexes_include_keys. contains ( & * MESSAGE_BUFFER_PID )
3206
- || !account_indexes_include_keys. contains ( & * BATCH_PUBLISH_PID )
3207
- {
3208
- panic ! (
3206
+ || !account_indexes_include_keys. contains ( & * BATCH_PUBLISH_PID ) )
3207
+ {
3208
+ panic ! (
3209
3209
"The oracle program id and message buffer program id must be included in the account index. Add the following flags\n \
3210
3210
--account-index-include-key {}\n \
3211
3211
--account-index-include-key {}\n \
3212
3212
--account-index-include-key {}\n ",
3213
3213
& * ORACLE_PID , & * MESSAGE_BUFFER_PID , & * BATCH_PUBLISH_PID ,
3214
3214
) ;
3215
- }
3216
3215
}
3217
3216
3218
- if exclude_keys {
3219
- if account_indexes_exclude_keys. contains ( & * ORACLE_PID )
3217
+ if exclude_keys
3218
+ && ( account_indexes_exclude_keys. contains ( & * ORACLE_PID )
3220
3219
|| account_indexes_exclude_keys. contains ( & * MESSAGE_BUFFER_PID )
3221
- || account_indexes_exclude_keys. contains ( & * BATCH_PUBLISH_PID )
3222
- {
3223
- panic ! ( "The oracle program id and message buffer program id must *not* be excluded from the account index." ) ;
3224
- }
3220
+ || account_indexes_exclude_keys. contains ( & * BATCH_PUBLISH_PID ) )
3221
+ {
3222
+ panic ! ( "The oracle program id and message buffer program id must *not* be excluded from the account index." ) ;
3225
3223
}
3226
3224
3227
3225
let keys = if !account_indexes. is_empty ( ) && ( exclude_keys || include_keys) {
You can’t perform that action at this time.
0 commit comments