/
sanity_check.go
66 lines (45 loc) · 1.54 KB
/
sanity_check.go
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package api
import (
"github.com/oasisprotocol/oasis-core/go/common"
"github.com/oasisprotocol/oasis-core/go/common/crypto/signature"
"github.com/oasisprotocol/nexus/coreapi/v23.0/common/node"
)
// SanityCheck performs a sanity check on the consensus parameters.
// removed func
// SanityCheck performs a sanity check on the consensus parameter changes.
// removed func
// SanityCheck does basic sanity checking on the genesis state.
// removed func
// SanityCheckEntities examines the entities table.
// Returns lookup of entity ID to the entity record for use in other checks.
// removed func
// SanityCheckRuntimes examines the runtimes table.
// removed func
// SanityCheckNodes examines the nodes table.
// Pass lookups of entities and runtimes from SanityCheckEntities
// and SanityCheckRuntimes for cross referencing purposes.
// removed func
// SanityCheckStake ensures entities' stake accumulator claims are consistent
// with general state and entities have enough stake for themselves and all
// their registered nodes and runtimes.
// removed func
// Runtimes lookup used in sanity checks.
type sanityCheckRuntimeLookup struct {
runtimes map[common.Namespace]*Runtime
suspendedRuntimes map[common.Namespace]*Runtime
allRuntimes []*Runtime
}
// removed func
// removed func
// removed func
// removed func
// removed func
// removed func
// Node lookup used in sanity checks.
type sanityCheckNodeLookup struct {
nodes map[signature.PublicKey]*node.Node
nodesList []*node.Node
}
// removed func
// removed func
// removed func