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

Ignore calls to startAuction for auctions already running. Fixes #54 #57

Merged
merged 2 commits into from Mar 27, 2017

Conversation

Arachnid
Copy link
Member

No description provided.

function startAuction(bytes32 _hash) registryOpen() {
var mode = state(_hash);
if(mode == Mode.Auction) return;
if(mode != Mode.Open) throw;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is not payable... why throw instead of return?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's an error to try and open an auction that can't be opened (at least in my mind), and throwing reflects this. If this is being called by startAuctions, it also ensures that the call as a whole fails.

@Arachnid Arachnid merged commit e0bb243 into master Mar 27, 2017
@Arachnid Arachnid deleted the idempotentopen branch March 27, 2017 12:51
ericobi pushed a commit to CodeXChainOfficial/ens that referenced this pull request Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants