From 7c22a387f34d5cbc92b6b6ed78c281a480ba7739 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Wed, 18 May 2016 11:05:28 -0400 Subject: Changed whitespace formatting --- docs/common-patterns.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs/common-patterns.rst') diff --git a/docs/common-patterns.rst b/docs/common-patterns.rst index 842b7c37..679552ff 100644 --- a/docs/common-patterns.rst +++ b/docs/common-patterns.rst @@ -179,6 +179,7 @@ function finishes. AreWeDoneYet, Finished } + // This is the current stage. Stages public stage = Stages.AcceptingBlindedBids; @@ -188,9 +189,11 @@ function finishes. if (stage != _stage) throw; _ } + function nextStage() internal { stage = Stages(uint(stage) + 1); } + // Perform timed transitions. Be sure to mention // this modifier first, otherwise the guards // will not take the new stage into account. @@ -211,6 +214,7 @@ function finishes. { // We will not implement that here } + function reveal() timedTransitions atStage(Stages.RevealBids) @@ -227,6 +231,7 @@ function finishes. _ nextStage(); } + function g() timedTransitions atStage(Stages.AnotherStage) @@ -235,12 +240,14 @@ function finishes. // If you want to use `return` here, // you have to call `nextStage()` manually. } + function h() timedTransitions atStage(Stages.AreWeDoneYet) transitionNext { } + function i() timedTransitions atStage(Stages.Finished) -- cgit v1.2.3