Skip to content

Commit 31874a0

Browse files
committed
Bugfix: RPC: blockchain: Actually include "temporary" flag in listprunelocks result
1 parent 427353a commit 31874a0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/rpc/blockchain.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,7 @@ static RPCHelpMan listprunelocks()
809809
heights_uv.push_back(lock_info.height_last);
810810
}
811811
prune_lock_uv.pushKV("height", heights_uv);
812+
prune_lock_uv.pushKV("temporary", lock_info.temporary);
812813
locks_uv.push_back(prune_lock_uv);
813814
}
814815
}

test/functional/feature_pruning.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def has_block(index):
329329
"desc": "Testing",
330330
"height": [2, 2],
331331
})
332-
assert_equal(node.listprunelocks(), {'prune_locks': [{'id': 'test', 'desc': 'Testing', 'height': [2, 2]}]})
332+
assert_equal(node.listprunelocks(), {'prune_locks': [{'id': 'test', 'desc': 'Testing', 'height': [2, 2], 'temporary': False}]})
333333
prune(500)
334334
assert has_block(0), "blk00000.dat is missing when should still be there"
335335
node.setprunelock("test", {}) # delete prune lock

0 commit comments

Comments
 (0)