MCPcopy Create free account
hub / github.com/CPChain/chain / checkRNodeNum

Function checkRNodeNum

contracts/dpor/rnode/rnode_test.go:508–515  ·  view source on GitHub ↗
(t *testing.T, instance *rnode.Rnode, amount int)

Source from the content-addressed store, hash-verified

506}
507
508func checkRNodeNum(t *testing.T, instance *rnode.Rnode, amount int) {
509 num, err := instance.GetRnodeNum(nil)
510 checkError(t, "get rnodes num", err)
511
512 if num.Cmp(new(big.Int).SetInt64(int64(amount))) != 0 {
513 t.Errorf("rnode'num %d != %d", num, amount)
514 }
515}
516
517func checkEnabled(t *testing.T, instance *rnode.Rnode, expect bool) {
518 enabled, err := instance.Enabled(nil)

Callers 9

TestRNodeJoinRNodeFunction · 0.85
TestRNodeNotEnoughInvestFunction · 0.85
TestRNodeJoinRNodeTwiceFunction · 0.85
TestRNodeMultiRNodesFunction · 0.85
TestRNodeThresholdFunction · 0.85
TestRefundFunction · 0.85
TestRefundAllFunction · 0.85

Calls 3

CmpMethod · 0.80
checkErrorFunction · 0.70
GetRnodeNumMethod · 0.45

Tested by

no test coverage detected