1

I modified an RPC call response for a PR, but some functional tests are failing. The error I'm getting is:

  File "/home/sliv3r/Documentos/Projectes/BitcoinCore/bitcoin/build/test/functional/feature_fee_estimation.py", line 203, in initial_split
    self.confutxo = self.wallet.send_self_transfer_multi(
  File "/home/sliv3r/Documentos/Projectes/BitcoinCore/bitcoin/test/functional/test_framework/wallet.py", line 295, in send_self_transfer_multi
    self.sendrawtransaction(from_node=from_node, tx_hex=tx["hex"])
  File "/home/sliv3r/Documentos/Projectes/BitcoinCore/bitcoin/test/functional/test_framework/wallet.py", line 397, in sendrawtransaction
    self.scan_tx(from_node.decoderawtransaction(tx_hex))
  File "/home/sliv3r/Documentos/Projectes/BitcoinCore/bitcoin/test/functional/test_framework/coverage.py", line 50, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/home/sliv3r/Documentos/Projectes/BitcoinCore/bitcoin/test/functional/test_framework/authproxy.py", line 146, in __call__
    raise JSONRPCException(response['error'], status)
test_framework.authproxy.JSONRPCException: Internal bug detected: RPC call "decoderawtransaction" returned incorrect type:
{
    "vin": {
        "0": {
            "witScript": "key returned that was not in doc"
        },
        "1": {
            "witScript": "key returned that was not in doc"
        }
    }
}

I am unable to find where the expected answers for RPC are defined. Where can I find this "doc"?

1 Answer 1

2

The Bitcoin Core JSON-RPC interface checks that the returned value matches the format specified in the documentation (doc for short). If you're adding a new field to decoderawtransaction, you also need to add the field to its documentation (called DecodeTxDoc in the code).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.