From 31874a0aeea64c2ce24fe2396fc78d5c8ac1e90b Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 20 Dec 2023 21:58:08 +0000 Subject: [PATCH] Bugfix: RPC: blockchain: Actually include "temporary" flag in listprunelocks result --- src/rpc/blockchain.cpp | 1 + test/functional/feature_pruning.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index ed7f4cacf9cfc..a41b6cf7af501 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -809,6 +809,7 @@ static RPCHelpMan listprunelocks() heights_uv.push_back(lock_info.height_last); } prune_lock_uv.pushKV("height", heights_uv); + prune_lock_uv.pushKV("temporary", lock_info.temporary); locks_uv.push_back(prune_lock_uv); } } diff --git a/test/functional/feature_pruning.py b/test/functional/feature_pruning.py index 33da9de6efbf6..0e5e3100eb65e 100755 --- a/test/functional/feature_pruning.py +++ b/test/functional/feature_pruning.py @@ -329,7 +329,7 @@ def has_block(index): "desc": "Testing", "height": [2, 2], }) - assert_equal(node.listprunelocks(), {'prune_locks': [{'id': 'test', 'desc': 'Testing', 'height': [2, 2]}]}) + assert_equal(node.listprunelocks(), {'prune_locks': [{'id': 'test', 'desc': 'Testing', 'height': [2, 2], 'temporary': False}]}) prune(500) assert has_block(0), "blk00000.dat is missing when should still be there" node.setprunelock("test", {}) # delete prune lock