Skip to content

Commit 8319e73

Browse files
jamesobjnewbery
authored andcommitted
[tests] Add coverage for the content of getblockchaininfo.softforks
1 parent 0328dcd commit 8319e73

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

test/functional/rpc_blockchain.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,31 @@ def _test_getblockchaininfo(self):
123123
assert_equal(res['prune_target_size'], 576716800)
124124
assert_greater_than(res['size_on_disk'], 0)
125125

126+
assert_equal(res['softforks'], {
127+
'bip34': {'type': 'buried', 'active': False, 'height': 500},
128+
'bip66': {'type': 'buried', 'active': False, 'height': 1251},
129+
'bip65': {'type': 'buried', 'active': False, 'height': 1351},
130+
'csv': {'type': 'buried', 'active': False, 'height': 432},
131+
'segwit': {'type': 'buried', 'active': True, 'height': 0},
132+
'testdummy': {
133+
'type': 'bip9',
134+
'bip9': {
135+
'status': 'started',
136+
'bit': 28,
137+
'startTime': 0,
138+
'timeout': 0x7fffffffffffffff, # testdummy does not have a timeout so is set to the max int64 value
139+
'since': 144,
140+
'statistics': {
141+
'period': 144,
142+
'threshold': 108,
143+
'elapsed': 57,
144+
'count': 57,
145+
'possible': True,
146+
},
147+
},
148+
'active': False}
149+
})
150+
126151
def _test_getchaintxstats(self):
127152
self.log.info("Test getchaintxstats")
128153

0 commit comments

Comments
 (0)