summaryrefslogtreecommitdiff
path: root/bip-0008/states.dot
blob: aa919ffc1914923c6f9d6fec0df5d43db826c7b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
digraph {
  rankdir=TD;

  node [style="rounded,filled,bold", shape=box, fixedsize=true, width=1.5, fontname="Arial"];

  edge [weight = 100];
  "DEFINED" -> "STARTED" [label="height >= start_height"];
  "STARTED" -> "MUST_SIGNAL" [label="height + 2016 >= timeoutheight AND lockinontimeout"];
  "STARTED" -> "FAILED" [label="height >= timeoutheight\nAND\nNOT lockinontimeout"];
  "LOCKED_IN" -> "ACTIVE" [label="always"];
  "MUST_SIGNAL" -> "LOCKED_IN" [label="always"];

  edge [weight = 1];
  "STARTED" -> "LOCKED_IN" [label="height < timeoutheight\nAND\nthreshold reached"];

  "FAILED" -> "LOCKED_IN" [style=invis];

  "DEFINED":sw -> "DEFINED":nw;
  "STARTED":sw -> "STARTED":nw;
  "ACTIVE":sw -> "ACTIVE":nw;
  "FAILED":sw -> "FAILED":nw;

  "STARTED" [fillcolor="#a0a0ff"];
  "MUST_SIGNAL" [fillcolor="#a0a0ff"];
  "LOCKED_IN" [fillcolor="#ffffa0"];
  "ACTIVE" [fillcolor="#a0ffa0"];
  "FAILED" [fillcolor="#ffa0a0"];

  { rank=same; "STARTED" "MUST_SIGNAL" }
  { rank=same; "FAILED" "LOCKED_IN" }
  { rank=sink; "ACTIVE" }
}