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

[refactor] Introduce action radio to broadcast #4497

Merged
merged 5 commits into from
Nov 26, 2024

Conversation

envestcc
Copy link
Member

Description

The ActionRadio component is introduced in this update to broadcast actions received in the API node to the network.

This is a pre-PR aimed at facilitating the implement of action retry mechanism next

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • Code refactor or improvement
  • [] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
  • [] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

@envestcc envestcc requested review from CoderZhi, dustinxie, Liuhaai and a team as code owners November 20, 2024 10:39
@envestcc envestcc mentioned this pull request Nov 20, 2024
1 task
api/action_radio.go Outdated Show resolved Hide resolved
Comment on lines +87 to +89
if err != nil {
log.L().Warn("Failed to broadcast SendAction request.", zap.Error(err), zap.String("actionHash", hex.EncodeToString(hash[:])))
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

return err

Copy link
Collaborator

Choose a reason for hiding this comment

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

nvm, it is an interface implementation

},
0)
r.NoError(radio.Start())
defer radio.Stop()
Copy link
Member

@dustinxie dustinxie Nov 26, 2024

Choose a reason for hiding this comment

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

defer func() {
    r.NoError(radio.Stop())
}()

Copy link

sonarcloud bot commented Nov 26, 2024

@envestcc envestcc merged commit 6ba6aa7 into iotexproject:master Nov 26, 2024
3 checks passed
@envestcc envestcc deleted the action-radio branch November 26, 2024 09:29
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