> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Type alias CustomSyncHandler

Module: `noir_aztec::messages::discovery`

```rust
pub type CustomSyncHandler = unconstrained fn(AztecAddress, ComputeNoteHash, ComputeNoteNullifier, Option<CustomMessageHandler>, Option<OffchainInboxSync>, AztecAddress);
```

Custom state synchronization handler.

When set via [`crate::macros::AztecConfig::custom_sync_state`](/aztec-nr-api/v6.0.0/noir_aztec/macros/struct.AztecConfig.md#custom_sync_state), the generated `sync_state` function will call this handler instead of [`do_sync_state`](/aztec-nr-api/v6.0.0/noir_aztec/messages/discovery/fn.do_sync_state.md). It receives all of the same parameters, so it can run custom logic (e.g. fetching and decrypting custom logs) before, after, or instead of calling [`do_sync_state`](/aztec-nr-api/v6.0.0/noir_aztec/messages/discovery/fn.do_sync_state.md).
