File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1741,6 +1741,7 @@ RPCHelpMan getblockchaininfo()
1741
1741
}
1742
1742
obj.pushKV (" size_on_disk" , chainman.m_blockman .CalculateCurrentUsage ());
1743
1743
obj.pushKV (" pruned" , node::fPruneMode );
1744
+ obj.pushKV (" trim_headers" , node::fTrimHeaders ); // ELEMENTS
1744
1745
if (g_signed_blocks) {
1745
1746
if (!DeploymentActiveAfter (tip, chainparams.GetConsensus (), Consensus::DEPLOYMENT_DYNA_FED)) {
1746
1747
CScript sign_block_script = chainparams.GetConsensus ().signblockscript ;
Original file line number Diff line number Diff line change @@ -187,6 +187,10 @@ def run_test(self):
187
187
self .mine_blocks (101 , False )
188
188
self .sync_all ()
189
189
self .check_height (expected_height , all = True )
190
+ # check the new field in getblockchaininfo
191
+ assert not self .nodes [0 ].getblockchaininfo ()["trim_headers" ]
192
+ assert self .nodes [1 ].getblockchaininfo ()["trim_headers" ]
193
+ assert self .nodes [2 ].getblockchaininfo ()["trim_headers" ]
190
194
191
195
self .log .info ("Shut down trimmed nodes" )
192
196
self .stop_node (1 )
@@ -201,7 +205,6 @@ def run_test(self):
201
205
tip = self .nodes [0 ].getblockhash (self .nodes [0 ].getblockcount ())
202
206
header = self .nodes [0 ].getblockheader (tip )
203
207
block = self .nodes [0 ].getblock (tip )
204
- info = self .nodes [0 ].getblockchaininfo ()
205
208
206
209
assert 'signblock_witness_asm' in header
207
210
assert 'signblock_witness_hex' in header
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ def _test_getblockchaininfo(self):
123
123
'pruned' ,
124
124
'size_on_disk' ,
125
125
'time' ,
126
+ 'trim_headers' ,
126
127
'verificationprogress' ,
127
128
'warnings' ,
128
129
]
You can’t perform that action at this time.
0 commit comments