Skip to content

Commit

Permalink
Bugfix: RPC: blockchain: Actually include "temporary" flag in listpru…
Browse files Browse the repository at this point in the history
…nelocks result
  • Loading branch information
luke-jr committed Dec 21, 2023
1 parent 427353a commit 31874a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/rpc/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/functional/feature_pruning.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 31874a0

Please sign in to comment.