From aa0ab69a151f2cb7e978ff1cd19df6fe32907bec Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 6 Feb 2017 14:53:56 -0800 Subject: [PATCH] Closes #2024 by documenting and testing method field in z_getoperationstatus --- doc/payment-api.md | 1 + qa/rpc-tests/wallet_protectcoinbase.py | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/payment-api.md b/doc/payment-api.md index 69877e5db..c4127b223 100644 --- a/doc/payment-api.md +++ b/doc/payment-api.md @@ -91,6 +91,7 @@ Asynchronous calls return an OperationStatus object which is a JSON object with Depending on the type of asynchronous call, there may be other key-value pairs. For example, a z_sendmany operation will also include the following in an OperationStatus object: +* method : name of operation e.g. z_sendmany * params : an object containing the parameters to z_sendmany Currently, as soon as you retrieve the operation status for an operation which has finished, that is it has either succeeded, failed, or been cancelled, the operation and any associated information is removed. diff --git a/qa/rpc-tests/wallet_protectcoinbase.py b/qa/rpc-tests/wallet_protectcoinbase.py index e99a4943b..9616a6c60 100755 --- a/qa/rpc-tests/wallet_protectcoinbase.py +++ b/qa/rpc-tests/wallet_protectcoinbase.py @@ -100,6 +100,7 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework): errorString = results[0]["error"]["message"] # Test that the returned status object contains a params field with the operation's input parameters + assert_equal(results[0]["method"], "z_sendmany") params =results[0]["params"] assert_equal(params["fee"], Decimal('0.0001')) # default assert_equal(params["minconf"], Decimal('1')) # default