Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warp: add details to accepted message log #984

Merged
merged 2 commits into from
Nov 6, 2023
Merged

warp: add details to accepted message log #984

merged 2 commits into from
Nov 6, 2023

Conversation

darioush
Copy link
Collaborator

@darioush darioush commented Nov 2, 2023

Why this should be merged

Adds more information to the log emitted when a block sending warp messages are accepted.

How this works

Passes through blockNumber, blockHash.

How this was tested

CI

How is this documented

N/A

@darioush darioush marked this pull request as ready for review November 2, 2023 19:00
@darioush darioush requested a review from anusha-ctrl November 2, 2023 19:32
Copy link
Collaborator

@ceyonur ceyonur left a comment

Choose a reason for hiding this comment

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

The interface function got a bit bulky, but I guess we have an cyclic import with types package. If this function gets any bigger, we should create a LogContext interface in the future.

@@ -75,7 +75,7 @@ type AcceptContext struct {
// will not maintain backwards compatibility of this interface and your code should not
// rely on this. Designed for use only by precompiles that ship with subnet-evm.
type Accepter interface {
Accept(acceptCtx *AcceptContext, txHash common.Hash, logIndex int, topics []common.Hash, logData []byte) error
Accept(acceptCtx *AcceptContext, blockHash common.Hash, blockNumber uint64, txHash common.Hash, logIndex int, topics []common.Hash, logData []byte) error
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wish we could have imported types.Log but seems it is cyclic :/

@darioush darioush merged commit ca99fd5 into master Nov 6, 2023
@darioush darioush deleted the add-log-info branch November 6, 2023 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants