16 BitcoinTestFramework.run_test (self)
18 tips = self.
nodes[0].getchaintips ()
19 assert_equal (len (tips), 1)
20 assert_equal (tips[0][
'branchlen'], 0)
21 assert_equal (tips[0][
'height'], 200)
22 assert_equal (tips[0][
'status'],
'active')
30 tips = self.
nodes[1].getchaintips ()
31 assert_equal (len (tips), 1)
33 assert_equal (shortTip[
'branchlen'], 0)
34 assert_equal (shortTip[
'height'], 210)
35 assert_equal (tips[0][
'status'],
'active')
37 tips = self.
nodes[3].getchaintips ()
38 assert_equal (len (tips), 1)
40 assert_equal (longTip[
'branchlen'], 0)
41 assert_equal (longTip[
'height'], 220)
42 assert_equal (tips[0][
'status'],
'active')
48 tips = self.
nodes[0].getchaintips ()
49 assert_equal (len (tips), 2)
50 assert_equal (tips[0], longTip)
52 assert_equal (tips[1][
'branchlen'], 10)
53 assert_equal (tips[1][
'status'],
'valid-fork')
54 tips[1][
'branchlen'] = 0
55 tips[1][
'status'] =
'active' 56 assert_equal (tips[1], shortTip)
58 if __name__ ==
'__main__':
59 GetChainTipsTest ().main ()
UniValue generate(const UniValue ¶ms, bool fHelp)