aboutsummaryrefslogtreecommitdiffstats
path: root/docs/common-patterns.rst
diff options
context:
space:
mode:
authorDenton Liu <liu.denton+github@gmail.com>2016-05-18 23:05:28 +0800
committerDenton Liu <liu.denton+github@gmail.com>2016-05-18 23:35:32 +0800
commit7c22a387f34d5cbc92b6b6ed78c281a480ba7739 (patch)
tree8300e1a97cc6537ff463ef705a5b28b313cfb6a0 /docs/common-patterns.rst
parentff26ea6c08a400192c5a5fff581a7ce649f717bd (diff)
downloaddexon-solidity-7c22a387f34d5cbc92b6b6ed78c281a480ba7739.tar.gz
dexon-solidity-7c22a387f34d5cbc92b6b6ed78c281a480ba7739.tar.zst
dexon-solidity-7c22a387f34d5cbc92b6b6ed78c281a480ba7739.zip
Changed whitespace formatting
Diffstat (limited to 'docs/common-patterns.rst')
-rw-r--r--docs/common-patterns.rst7
1 files changed, 7 insertions, 0 deletions
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)