StatesToRecord
Keywords: net.corda.core.node.StatesToRecord class
Date: 2023-09-18

net.corda.core.node

## Enum StatesToRecord

-     public enum StatesToRecord

  Controls whether the transaction is sent to the vault at all, and if so whether states have to be relevant or not in order to be recorded. Used in `ServiceHub.recordTransactions`

  See Also:
    `ServiceHub.recordTransactions`

- - ### Enum Constant Detail

    - #### NONE

          public static StatesToRecord NONE

      The received transaction is not sent to the vault at all. This is used within transaction resolution.

    - #### ALL_VISIBLE

          public static StatesToRecord ALL_VISIBLE

      All states that can be seen in the transaction will be recorded by the vault, even if none of the identities on this node are a participant or owner.

    - #### ONLY_RELEVANT

          public static StatesToRecord ONLY_RELEVANT

      Only states that involve one of our public keys will be stored in the vault. This is the default. A public key is involved (relevant) if it's in the `OwnableState.owner` field, or appears in the `ContractState.participants` collection. This is usually equivalent to "can I change the contents of this state by signing a transaction".

      See Also:
        `OwnableState.owner`, `ContractState.participants`