Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Contracts] resume_stream lacks an is_active/status guard - a cancelled-while-paused stream can be resumed back to Active

オープン
#787 コメント 10 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 7 日以内に返信

@Anthony-19 がすでに取り組んでいます。

2026年6月30日 から。

  • #964 @Anthony-19 による — マージされずにクローズ
  • #988 @Anthony-19 による — オープン

評価

この issue はまだ評価されていません。

説明

bug contracts GrantFox OSS Maybe Rewarded Official Campaign | FWC26 rust Stellar Wave

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Labels: bug, contracts, Stellar Wave, rust

A stream that was cancelled while paused can be resumed back to Active, leaving an inconsistent record.

cancel_stream (lib.rs:515-518) sets is_active=false and status=Cancelled but never clears paused or paused_at. resume_stream (lib.rs:591) only checks if !stream.paused and never calls validate_stream_active. So if a stream was paused (paused=true) and then cancelled, it still passes the resume check: status flips back to Active (lib.rs:613) while is_active stays false. That's a contradictory record, plus a phantom stream_resumed event with a bogus new_end_time that indexers read as a reactivation.

What the fix has to hold to

  • resume_stream rejects any non-active stream
  • Cancelling settles the pause flags so no stale paused state lingers

Done when

  • resume_stream rejects non-active streams (call validate_stream_active or require status==Paused), returning StreamInactive
  • cancel_stream clears paused/paused_at when settling
  • Test: pause, then cancel, then resume_stream returns StreamInactive and emits no stream_resumed event
  • Tests + fmt pass, CI green

Where to start
All in contracts/stream_contract/src/lib.rs. Indexer/event-worker changes are out of scope. Small guard plus a state-cleanup line.

主要言語
TypeScript
スター
18
フォーク
250
平均マージ
5日 6時間
マージ済み PR(30日)
83

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

LabsCrypt/flowfi のほかの issue

LabsCrypt/flowfi の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。