From f28674511c84e4f314d71f630a0e9e04ebe2981e Mon Sep 17 00:00:00 2001 From: Ashok Menon Date: Sun, 15 Sep 2024 08:14:34 +0100 Subject: [PATCH] rest: discard failed dynamic field indices (#19377) ## Description Allow dynamic field indexing to fail when building up fullnode REST indices to bring it in line with behaviour in `sui-indexer`, `sui-analytics-indexer`, and the existing fullnode indices. ## Test plan CI --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API: --- crates/sui-core/src/rest_index.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/sui-core/src/rest_index.rs b/crates/sui-core/src/rest_index.rs index ade98f8ada4dd..7e16553172beb 100644 --- a/crates/sui-core/src/rest_index.rs +++ b/crates/sui-core/src/rest_index.rs @@ -452,7 +452,9 @@ impl IndexStoreTables { } Owner::ObjectOwner(parent) => { if let Some(field_info) = - try_create_dynamic_field_info(object, resolver)? + try_create_dynamic_field_info(object, resolver) + .ok() + .flatten() { let field_key = DynamicFieldKey::new(*parent, object.id());