pokt-network / pocket

Official implementation of the Pocket Network Protocol v1
https://pokt.network
MIT License
61 stars 33 forks source link

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

Closed innocent-saeed36 closed 1 year ago

innocent-saeed36 commented 1 year ago

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):