Skip to content

[Persistence][Bug] Fix Actor Schema Assignment for ValidatorActor in GetActor#857

Merged
Olshansk merged 1 commit intopokt-network:mainfrom
innocent-saeed36:patch-5
Jul 3, 2023
Merged

[Persistence][Bug] Fix Actor Schema Assignment for ValidatorActor in GetActor#857
Olshansk merged 1 commit intopokt-network:mainfrom
innocent-saeed36:patch-5

Conversation

@innocent-saeed36
Copy link
Copy Markdown
Contributor

@innocent-saeed36 innocent-saeed36 commented Jun 24, 2023

Issue:

An issue was discovered in the GetActor function defined in actor.go. Specifically, when the actorType input argument matches with types.ValidatorActor.GetActorType(), the schema variable is currently assigned as types.FishermanActor. This appears to be a typo or error, as logically schema should be assigned types.ValidatorActor in this case. This could potentially cause GetActor to behave unexpectedly when called with types.ValidatorActor.GetActorType() as it would process as if it were types.FishermanActor.GetActorType().

Proposed Fix:

This pull request corrects the schema assignment for types.ValidatorActor.GetActorType() from types.FishermanActor to types.ValidatorActor, thus aligning the function behavior with the expected logic.

Type of change

Please mark the relevant option(s):

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Major breaking change
  • Documentation
  • Other

During a review of the GetActor function in actor.go, it is found that the schema for types.ValidatorActor.GetActorType() was incorrectly set to types.FishermanActor. This commit corrects this issue by ensuring that the schema assignment for types.ValidatorActor.GetActorType() is indeed types.ValidatorActor.
@Olshansk Olshansk merged commit 3277c45 into pokt-network:main Jul 3, 2023
Olshansk pushed a commit that referenced this pull request Jul 5, 2023
…GetActor (#857)

## Issue:

An issue was discovered in the `GetActor` function defined in `actor.go`. Specifically, when the `actorType` input argument matches with `types.ValidatorActor.GetActorType()`, the `schema` variable is currently assigned as `types.FishermanActor`. This appears to be a typo or error, as logically `schema` should be assigned `types.ValidatorActor` in this case. This could potentially cause `GetActor` to behave unexpectedly when called with `types.ValidatorActor.GetActorType()` as it would process as if it were `types.FishermanActor.GetActorType()`.

## Proposed Fix:

This pull request corrects the `schema` assignment for `types.ValidatorActor.GetActorType()` from `types.FishermanActor` to `types.ValidatorActor`, thus aligning the function behavior with the expected logic.

## Type of change

Please mark the relevant option(s):

- [ ] New feature, functionality or library
- [x] Bug fix
- [ ] Code health or cleanup
- [ ] Major breaking change
- [ ] Documentation
- [ ] Other <!-- add details here if it a different type of change -->
bryanchriswhite added a commit that referenced this pull request Jul 7, 2023
* pokt/main:
  [Utility] Update E2E feature path template doc (#870)
  [IBC] Add nil check on proof for membership and non-membership proof creation (#877)
  Added git diff state to devlog10
  Devlog 10 (#872)
  [Documentation] Add IBC Module introduction as an example (#853)
  [Persistence][Bug] Fix Actor Schema Assignment for ValidatorActor in GetActor (#857)
  QOL: add bash completion for p1 to localnet client (#865)
bryanchriswhite added a commit that referenced this pull request Jul 7, 2023
* feat/integrate-bg-router:
  fix: goimports
  fix: unstaked actor bootstrapping FSM transition
  chore: add error log
  test: improve background router validation test
  docs: fix mistake in peer discovery section
  [Utility] Update E2E feature path template doc (#870)
  [IBC] Add nil check on proof for membership and non-membership proof creation (#877)
  Added git diff state to devlog10
  Devlog 10 (#872)
  [Documentation] Add IBC Module introduction as an example (#853)
  [Persistence][Bug] Fix Actor Schema Assignment for ValidatorActor in GetActor (#857)
  QOL: add bash completion for p1 to localnet client (#865)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

small Pull request is small waiting-for-review

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants