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

Semantics: appWasMade #31

Open
kangarang opened this issue Oct 11, 2017 · 7 comments
Open

Semantics: appWasMade #31

kangarang opened this issue Oct 11, 2017 · 7 comments

Comments

@kangarang
Copy link
Contributor

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
Copy link
Contributor

agreed, isInApplication is better imo

@skmgoldin
Copy link
Contributor

Just so we have it here to look at:

// Returns true if apply(domain) was called for this domain
function appWasMade(string _domain) constant public returns (bool exists) {
return listingMap[keccak256(_domain)].applicationExpiry > 0;
}

@kangarang
Copy link
Contributor Author

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

  • a challenge succeeds
  • the applicant invokes exit
  • the listing struct's unstakedDeposit is for some reason less that the minimumDeposit

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

My apologies for this misunderstanding. I was definitely confused.

@skmgoldin skmgoldin reopened this Oct 17, 2017
@skmgoldin
Copy link
Contributor

skmgoldin commented Oct 17, 2017

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
Copy link
Contributor Author

domainIsActive
domainWasInitialized

@skmgoldin
Copy link
Contributor

I'm not afraid of long method names.

@kangarang
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants