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 Sep 3, 2024
1 parent 53e5476 commit 11e1e09
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 @@ -861,6 +861,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 @@ -330,7 +330,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 11e1e09

Please sign in to comment.