Skip to content

Conversation

@siburu
Copy link
Contributor

@siburu siburu commented May 29, 2025

No description provided.

@siburu siburu force-pushed the feature/relayer-v0.5.13-op branch from ea2576d to 5ff405f Compare June 19, 2025 05:24
Signed-off-by: Masanori Yoshida <masanori.yoshida@datachain.jp>
@siburu siburu force-pushed the feature/relayer-v0.5.13-op branch from e06d27b to cf482af Compare June 23, 2025 05:40
@siburu siburu changed the title [DO_NOT_MERGE] Support the new interface of SetupHeadersForUpdate, which returns chan Support the new interface of SetupHeadersForUpdate, which returns chan Jun 23, 2025
@siburu siburu marked this pull request as ready for review June 23, 2025 08:29
@siburu siburu requested a review from yoshidan June 23, 2025 08:29
module/prover.go Outdated
return pr.SetupHeadersForUpdateByLatestHeight(ctx, cs.GetLatestHeight(), header)
if headers, err := pr.SetupHeadersForUpdateByLatestHeight(ctx, cs.GetLatestHeight(), header); err != nil {
return nil, err
} else if headers == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if headers is nil, headers... does not cause panic.
This can reduce the number of branches.

if headers, err := pr.SetupHeadersForUpdateByLatestHeight(ctx, cs.GetLatestHeight(), header); err != nil {
	return nil, err
} else {
	return core.MakeHeaderStream(headers...), nil
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yoshidan thank you! I adopted your advice: 56766e6

siburu added 2 commits June 23, 2025 20:52
Signed-off-by: Masanori Yoshida <masanori.yoshida@datachain.jp>
Signed-off-by: Masanori Yoshida <masanori.yoshida@datachain.jp>
@siburu siburu requested a review from yoshidan June 23, 2025 14:14
@siburu siburu merged commit 0bf0123 into main Jun 24, 2025
2 checks passed
@siburu siburu deleted the feature/relayer-v0.5.13-op branch June 24, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants