mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-28 23:08:52 +01:00
Merge bitcoin/bitcoin#23398: rpc: add return message to savemempool RPC
aa1a4c9204Add file validation to savemempool RPC test (lsilva01)871e64d22fAdd filename to savemempool RPC result (lsilva01) Pull request description: Currently, if the user calls the `savemempool` RPC method, there is no way to know where the file was created (unless the user knows internal implementation details). This PR adds a return message stating the file name and path where the mempool was saved and changes `mempool_persist.py` to validate this new return message. ACKs for top commit: laanwj: Code review ACKaa1a4c9204Tree-SHA512: e8b1dd0a8976e5eb15f7476c9651e492d2c621a67e0b726721fa7a2ae0ddd272ee28b87a2d0c650bd635e07fa96bdefe77bece4deb6486ef3ee9a4f83423a840
This commit is contained in:
@@ -149,8 +149,9 @@ class MempoolPersistTest(BitcoinTestFramework):
|
||||
mempooldat1 = os.path.join(self.nodes[1].datadir, self.chain, 'mempool.dat')
|
||||
self.log.debug("Remove the mempool.dat file. Verify that savemempool to disk via RPC re-creates it")
|
||||
os.remove(mempooldat0)
|
||||
self.nodes[0].savemempool()
|
||||
result0 = self.nodes[0].savemempool()
|
||||
assert os.path.isfile(mempooldat0)
|
||||
assert_equal(result0['filename'], mempooldat0)
|
||||
|
||||
self.log.debug("Stop nodes, make node1 use mempool.dat from node0. Verify it has 6 transactions")
|
||||
os.rename(mempooldat0, mempooldat1)
|
||||
|
||||
Reference in New Issue
Block a user