xmtp / libxmtp

MIT License
33 stars 13 forks source link

Clear pending commit state after commit validation fails #820

Closed cameronvoell closed 4 weeks ago

cameronvoell commented 4 weeks ago

Fixes #805

Changes for preventing groups being stuck in a pending-commit state:

  1. when a staged commit fails validation, clear pending commit state and set intent state to failed => https://github.com/xmtp/libxmtp/pull/820/files#diff-202bbf85eac4d977447dc52cf6f01c12b56e9b8e72e579844bfa5bc43862acecR233-R243
  2. do not return an error for functions passed into process_for_id if they contain db transactions you do not wish to be rolled back https://github.com/xmtp/libxmtp/pull/820/files#diff-202bbf85eac4d977447dc52cf6f01c12b56e9b8e72e579844bfa5bc43862acecR244-R246
  3. do not retry intents with IntentState::Error, instead return an error https://github.com/xmtp/libxmtp/pull/820/files#diff-202bbf85eac4d977447dc52cf6f01c12b56e9b8e72e579844bfa5bc43862acecR154-R161