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

[Either] refactor: add either.Bytes alias #117

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Oct 30, 2023

Summary

Human Summary

Quick refactoring of either.Either[[]byte] to either.Bytes for improved readability & convenience.

AI Summary

Summary generated by Reviewpad on 30 Oct 23 23:05 UTC

This pull request refactors the code by adding an alias either.Bytes. The changes are made in the pkg/client/events_query/client.go, pkg/client/interface.go, and pkg/either/types.go files. The eventsBytes field in the eventsBytesAndConn struct now receives an either.Bytes type instead of either.Either[[]byte]. Similarly, the eventsBzObservable and eventsBzPublishCh variables in the newEventsBytesAndConn function are changed to observable.Observable[either.Bytes] and channel.NewObservable[either.Bytes]() respectively. The eventsBzPublishCh parameter in the goPublishEventsBz function is also changed to chan<- either.Bytes. Furthermore, in the pkg/client/interface.go file, the EventsBytesObservable type alias is now defined as observable.Observable[either.Bytes]. Finally, in the pkg/either/types.go file, the Bytes type alias is created as a shorthand for Either[[]byte].

Issue

Relates to:

Type of change

Select one or more:

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify)

Testing

  • Run all unit tests: make go_develop_and_test
  • Verify Localnet manually: See the instructions [here](TODO: add link to instructions)

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have performed a self-review of my own code
  • I have commented my code, updated documentation and left TODOs throughout the codebase

@bryanchriswhite bryanchriswhite added miner Changes related to the Miner off-chain Off-chain business logic labels Oct 30, 2023
@bryanchriswhite bryanchriswhite added this to the Shannon TestNet milestone Oct 30, 2023
@bryanchriswhite bryanchriswhite self-assigned this Oct 30, 2023
@bryanchriswhite bryanchriswhite marked this pull request as ready for review October 30, 2023 23:05
@bryanchriswhite bryanchriswhite merged commit fd0db1d into main Oct 30, 2023
@bryanchriswhite bryanchriswhite deleted the refactor/either-bytes branch October 30, 2023 23:24
bryanchriswhite added a commit that referenced this pull request Oct 31, 2023
* pokt/main:
  refactor: add `either.Bytes` alias (#117)
  feat: add either.AsyncErr type & helpers (#115)
Olshansk pushed a commit that referenced this pull request Oct 31, 2023
bryanchriswhite added a commit that referenced this pull request Nov 7, 2023
…plementation

* pokt/main: (28 commits)
  [Miner] feat: add supplier client (#42)
  [Off-chain] refactor: keyring errors & helpers (#131)
  [Miner] feat: add `TxClient` (#94)
  [CI] Build container images (#107)
  fix: flaky block client test (#132)
  [Tooling] add `go_lint` & `go_imports` make targets & CI step (#129)
  Update README.md
  [Code Health] Support `godoc` by replacing the `pocket `module name with `github.com/pokt-network/poktroll` (#128)
  [Miner] feat: add `TxContext` (#118)
  [Testing] fix: flaky tests in observable & client pkgs (#124)
  Added first roadmap change
  [AppGate] Implement UndelegateFromGateway with Extensive Tests (#125)
  [Miner] feat: add block client (#65)
  [Supplier] Add `ServiceConfigs` to `SupplierStaking` (#114)
  [AppGate] Add the MaxDelegatedGateways parameter (#109)
  [Test] Temporarily skip a flaky test `TestEventsQueryClient_Subscribe_Succeeds` (#121)
  [AppGate] Implement DelegateToGateway and add Tests (#90)
  [E2E] Add (Un)Stake Tests (#88)
  refactor: add `either.Bytes` alias (#117)
  feat: add either.AsyncErr type & helpers (#115)
  ...
okdas pushed a commit that referenced this pull request Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
miner Changes related to the Miner off-chain Off-chain business logic
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants