AdChain / AdChainRegistry

adChain registry smart contracts
Apache License 2.0
30 stars 10 forks source link

Semantics: appWasMade #31

Open kangarang opened 7 years ago

kangarang commented 7 years ago

I think we should reword function appWasMade to isInApplication or isBeingReviewed or something else to better describe the stage/timing of the domain's current state. Since items in listingMap are deleted during resetListing, it could be confusing if appWasMade correctly returns false for an application that i definitely made, but is completed and already whitelisted.

miguelmota commented 7 years ago

agreed, isInApplication is better imo

skmgoldin commented 7 years ago

Just so we have it here to look at: https://github.com/AdChain/AdChainRegistry/blob/cf0d0f5e666ada661ee24269b8650b2ce944faaf/contracts/Registry.sol#L306-L309

kangarang commented 7 years ago

Actually, I take this back. items in listingMap only get deleted by resetListing if and only if:

So appWasMade returns true (as expected) for white-listed applications.

My apologies for this misunderstanding. I was definitely confused.

skmgoldin commented 7 years ago

If a domain applies and either is or is not listed, we don't care, then it is true forever that that domain did apply. Semantically. So maybe this needs to be named domainIsInApplicationOrIsListed?

kangarang commented 7 years ago

domainIsActive domainWasInitialized

skmgoldin commented 7 years ago

I'm not afraid of long method names.

kangarang commented 7 years ago

Right on! Let's go with domainIsInApplicationOrIsListed then since it's the most specific.