mirror of
https://github.com/bitcoin/bips.git
synced 2026-05-11 16:51:51 +00:00
BIP8: add dot file for generating states diagram
This commit is contained in:
committed by
Luke Dashjr
parent
903d7a3a91
commit
3c63846fc2
34
bip-0008/states.dot
Normal file
34
bip-0008/states.dot
Normal file
@@ -0,0 +1,34 @@
|
||||
digraph {
|
||||
rankdir=TD;
|
||||
|
||||
node [style="rounded,filled,bold", shape=box, fixedsize=true, width=1.3, fontname="Arial"];
|
||||
|
||||
edge [weight = 100];
|
||||
"DEFINED" -> "STARTED" [label="height >= start_height"];
|
||||
"STARTED" -> "FAILING" [label="height >= timeoutheight AND NOT lockinontimeout"];
|
||||
"STARTED" -> "LOCKED_IN" [label="(height < timeoutheight AND threshold reached)\nOR\n(height >= timeoutheight AND lockinontimeout)"];
|
||||
"LOCKED_IN" -> "ACTIVE" [label="always"];
|
||||
"FAILING" -> "FAILED" [label="NOT all blocks signal"];
|
||||
|
||||
edge [weight = 1];
|
||||
"FAILING" -> "ACTIVE" [label="all blocks signal"];
|
||||
|
||||
"DEFINED":sw -> "DEFINED":nw;
|
||||
"STARTED":sw -> "STARTED":nw;
|
||||
"ACTIVE":sw -> "ACTIVE":nw;
|
||||
"FAILED":sw -> "FAILED":nw;
|
||||
|
||||
"STARTED" [fillcolor="#a0a0ff"];
|
||||
|
||||
"FAILING" [fillcolor="#ffffa0"];
|
||||
"LOCKED_IN" [fillcolor="#ffffa0"];
|
||||
"ACTIVE" [fillcolor="#a0ffa0", shape=box];
|
||||
"FAILED" [fillcolor="#ffa0a0", shape=box];
|
||||
|
||||
"ACTIVE" -> "FAILED" [style=invis];
|
||||
|
||||
{ rank=same; "STARTED" "FAILING" }
|
||||
{ rank=sink; "ACTIVE" "FAILED" }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user