<p>At the moment, <code>MiniWallet</code> doesn't do any signing. It generates an address and sends an effective regtest coinbase to it. It then constructs an OP_TRUE transaction that spends to yourself with a fee.</p>
<p>I'm not sure at this stage if this is enough to replace the reliance on the Core wallet for all non-wallet functional tests but I will look into it more.</p>
<p>MiniWallet is <a href="https://github.com/bitcoin/bitcoin/pull/20692#issuecomment-747802638" rel="nofollow noreferrer">not</a> a wallet handled by the node, it is an &quot;external&quot; wallet coded in Python for testing. gettransaction only works for those wallets handled by the node, that's why the error says: non-wallet transaction id</p>

CC BY-SA 4.0
2020-12-29T18:15:10.927Z
2020-12-31T15:57:14.037Z
2020-12-31T15:57:14.037Z
Michael Folkson
<p>I tried to run the Taproot functional tests after building Bitcoin Core with the wallet disabled (as I knew there was no Taproot code in the Core wallet at the time of writing, December 2020).</p>
<p>However, they were skipped because a number of the functional tests currently rely on the Core wallet to create and sign transactions. (Thanks to Marco Falke for pointing this out on IRC.)</p>
<p>The introduction of <a href="https://github.com/bitcoin/bitcoin/pull/19800" rel="nofollow noreferrer">MiniWallet</a> though raises the prospect of being able to update these non-wallet functional tests so they no longer rely on the Core wallet.</p>
<p>There is a <a href="https://github.com/bitcoin/bitcoin/issues/20078" rel="nofollow noreferrer">good first issue</a> open on the Bitcoin Core repo to do this for all non-wallet tests. As Marco states in that issue:</p>
<blockquote>
<p>This is an open-ended issue. You can find candidate tests via
<code>git grep self.skip_if_no_wallet()</code>. Exclude the tests that start with <code>wallet_</code>, as those are tests that are meant to test the Bitcoin Core wallet.</p>
</blockquote>
<p>So what does the <a href="https://github.com/bitcoin/bitcoin/blob/master/test/functional/test_framework/wallet.py#L28" rel="nofollow noreferrer">MiniWallet class</a> currently do (and perhaps need to do) so that all non-wallet functional tests can be rewritten to no longer rely on the Core wallet?</p>

<bitcoin-core-development><functional-test>
What does the MiniWallet class currently do and need to do in the Bitcoin Core functional test framework?
Michael Folkson
# What does the MiniWallet class currently do and need to do in the Bitcoin Core functional test framework?

(Asked by: username_0 on 2020-12-29)

I tried to run the Taproot functional tests after building Bitcoin Core with the wallet disabled (as I knew there was no Taproot code in the Core wallet at the time of writing, December 2020).

However, they were skipped because a number of the functional tests currently rely on the Core wallet to create and sign transactions. (Thanks to Marco Falke for pointing this out on IRC.)

The introduction of [MiniWallet](https://github.com/bitcoin/bitcoin/pull/19800) though raises the prospect of being able to update these non-wallet functional tests so they no longer rely on the Core wallet.

There is a [good first issue](https://github.com/bitcoin/bitcoin/issues/20078) open on the Bitcoin Core repo to do this for all non-wallet tests. As Marco states in that issue:

> This is an open-ended issue. You can find candidate tests via
> `git grep self.skip_if_no_wallet()`. Exclude the tests that start with `wallet_`, as those are tests that are meant to test the Bitcoin Core wallet.

So what does the [MiniWallet class](https://github.com/bitcoin/bitcoin/blob/master/test/functional/test_framework/wallet.py#L28) currently do (and perhaps need to do) so that all non-wallet functional tests can be rewritten to no longer rely on the Core wallet?

**Tags:** bitcoin-core-development, functional-test


---

## 1 answers

### Answer by username_0 on 2020-12-29. Score: 1 | Accepted answer

At the moment, `MiniWallet` doesn't do any signing. It generates an address and sends an effective regtest coinbase to it. It then constructs an OP\_TRUE transaction that spends to yourself with a fee.

I'm not sure at this stage if this is enough to replace the reliance on the Core wallet for all non-wallet functional tests but I will look into it more.

MiniWallet is [not](https://github.com/bitcoin/bitcoin/pull/20692#issuecomment-747802638) a wallet handled by the node, it is an "external" wallet coded in Python for testing. gettransaction only works for those wallets handled by the node, that's why the error says: non-wallet transaction id


---

