Exercises
-
Modify a wallet RPC
-
Create a descriptor wallet
-
Generate coins to yourself
-
Remove the
"dummy"
parameter from thegetbalance
Wallet RPC -
Ensure that the
rpc_help.py
functional test passes (but ignore other test failures), fixing any errorsrun test/functional/rpc_help.py
to just run a single test -
Check that the rpc call
getbalance 3 true true
passes with thedummy
parameter removed
-
-
IsMine
-
Create a descriptor wallet
-
Generate coins to yourself
-
Send coins to yourself in a transaction and generate a block to confirm
-
Modify the wallet’s
IsMine()
logic to always returnfalse
-
Generate a new block and try to send coins to yourself in a transaction again
-
Observe the changes
-
-
Coin Selection
-
Create a descriptor wallet
-
Generate 200 blocks to yourself
-
Call
listunspent
and thensend
a large amount (e.g. 600 BTC) to yourself and observe how many inputs were used -
Add a new preferred coin selection algorithm to the wallet that uses all UTXOs in the wallet and optionally remove the other algorithms.
-
Redo the send and confirm that this time it will select all inputs in the wallet for the transaction
-
-
Adding a new RPC
-
Add a new RPC which when called will simply return to the user a random UTXO from the wallet in the form
{ "txid": <txid>, "vout": <vout> }
-