Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

suggestion!export more infomation for checking method in one place, give avalable message after message executed #94

Closed
hunjixin opened this issue Feb 4, 2020 · 2 comments
Labels
enhancement New feature or request P3 Not urgent or important

Comments

@hunjixin
Copy link

hunjixin commented Feb 4, 2020

  1. It would be better to export a struct include method function and some extra filed like below
type ActorMethod struct {
	MethodFunc interface{}
	ImmediateCaller   addr.Address
	CallerType    []cid.Cid
	AccessRole   int
	//  ... etc
}

In this way, we can control all method check in the same code, instead of writing sanity-checking code in every method once

  1. noticed that the return value of the publishstoragedeals method has become null.
// this project
func (a *StorageMarketActor) PublishStorageDeals(rt Runtime, params *PublishStorageDealsParams) *adt.EmptyValue {
//lotus
func (sma StorageMarketActor) PublishStorageDeals(act *types.Actor, vmctx types.VMContext, params *PublishStorageDealsParams) ([]byte, ActorError) {

hope some methods can give some valuable information instead of becoming adt.emptyvalue

@hunjixin hunjixin changed the title two suggestion suggestion!export more infomation for checking method in one place, give avalable message after message executed Feb 4, 2020
@anorth anorth added enhancement New feature or request P3 Not urgent or important labels Feb 8, 2020
@anorth
Copy link
Member

anorth commented Feb 8, 2020

I interpret the first request as talking about a declarative form for caller and other validation, as opposed to the current procedural form.

I agree that would have some benefits. I'm marking this non-urgent for now. We should be able to improve this later without breaking compatibility (unless it reveals bugs).

@anorth
Copy link
Member

anorth commented Jun 29, 2020

Folding in to #178.

@anorth anorth closed this as completed Jun 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request P3 Not urgent or important
Projects
None yet
Development

No branches or pull requests

2 participants