Skip to content

Commit 288186e

Browse files
authored
Remove unsupported EventFilters for now (#11183)
## Description Return error when unimplemented filters are matched ``` curl -X POST -H 'Content-Type: application/json' -d '{ "jsonrpc":"2.0", "method":"suix_queryEvents", "params": [ { "All":[ {"Package":"0x3dcfc5338d8358450b145629c985a9d6cb20f9c0ab6667e328e152cdfd8022cd"} ] }, null, 10, false ], "id":1 }' 127.0.0.1:9000 ; echo {"jsonrpc":"2.0","error":{"code":-32000,"message":"This query type does not currently support filter combinations."},"id":1} ``` ## Test Plan How did you test the new or updated feature? --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes
1 parent 021a40d commit 288186e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

crates/sui-core/src/authority.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2613,7 +2613,15 @@ impl AuthorityState {
26132613

26142614
let limit = limit + 1;
26152615
let mut event_keys = match query {
2616-
EventFilter::All(..) => index_store.all_events(tx_num, event_num, limit, descending)?,
2616+
EventFilter::All(filters) => {
2617+
if filters.is_empty() {
2618+
index_store.all_events(tx_num, event_num, limit, descending)?
2619+
} else {
2620+
return Err(anyhow!(
2621+
"This query type does not currently support filter combinations."
2622+
));
2623+
}
2624+
}
26172625
EventFilter::Transaction(digest) => {
26182626
index_store.events_by_transaction(&digest, tx_num, event_num, limit, descending)?
26192627
}

0 commit comments

Comments
 (0)