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()
17411741 }
17421742 obj.pushKV (" size_on_disk" , chainman.m_blockman .CalculateCurrentUsage ());
17431743 obj.pushKV (" pruned" , node::fPruneMode );
1744+ obj.pushKV (" trim_headers" , node::fTrimHeaders ); // ELEMENTS
17441745 if (g_signed_blocks) {
17451746 if (!DeploymentActiveAfter (tip, chainparams.GetConsensus (), Consensus::DEPLOYMENT_DYNA_FED)) {
17461747 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):
187187 self .mine_blocks (101 , False )
188188 self .sync_all ()
189189 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" ]
190194
191195 self .log .info ("Shut down trimmed nodes" )
192196 self .stop_node (1 )
@@ -201,7 +205,6 @@ def run_test(self):
201205 tip = self .nodes [0 ].getblockhash (self .nodes [0 ].getblockcount ())
202206 header = self .nodes [0 ].getblockheader (tip )
203207 block = self .nodes [0 ].getblock (tip )
204- info = self .nodes [0 ].getblockchaininfo ()
205208
206209 assert 'signblock_witness_asm' in header
207210 assert 'signblock_witness_hex' in header
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ def _test_getblockchaininfo(self):
123123 'pruned' ,
124124 'size_on_disk' ,
125125 'time' ,
126+ 'trim_headers' ,
126127 'verificationprogress' ,
127128 'warnings' ,
128129 ]
You can’t perform that action at this time.
0 commit comments