A New Wallet Method¶
A method added to MoneroWallet, in the bindings and in its stub src/monero/monero_wallet.pyi, needs two more things, or tests/wallet/test_support.py fails:
- A call of it in
WALLET_CALLSoftests/utils/wallet_calls.py, one for each overload, with arguments of the right types:WalletCall("get_tx", "tx_hash", lambda w: w.get_tx("")),tests/wallet/test_interface.pymakes it onMoneroWallet, where it has to raise "not supported", andtest_support.pyon each wallet type. Two flags are for the calls that are different:in_base=TruewhenMoneroWalletimplements it on top of its other methods,waits=Truewhen a wallet that implements it waits on the network, aswait_for_next_block. - A row in
tests/wallet/wallet_support.yml, in its section, with the support of each wallet type:The states areget_tx: {full: supported, rpc: supported, keys: unsupported}supported,partial(with anotethat says which overloads),todoandunsupported. The test calls the method on a full wallet with no daemon, an rpc wallet with no server and a keys-only wallet, and fails when the row says otherwise. It tells implemented from not,todoandunsupportedare the choice of the row.
The row is what the Wallet Support page shows.