`initialfreecoins` does not work for descriptor wallets.

Open
#1,106 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
blockchain, cli

Research direction

Start by reproducing the regtest setup from elements.conf with initialfreecoins and anyonecanspendaremine, then compare createwallet descriptors=true against a non-descriptor wallet using the listed elements-cli commands. Trace the descriptor-wallet balance and initial-funds handling; done means the documented expected balance is returned consistently or the unsupported behavior is clearly established and covered by a regression test.

Written by the indexing model from the issue text.

Description

I am not even sure if this should work. If it worked earlier for me. But it does not work now.

Steps to reproduce:
Set the following in the elements.conf file (regtest mode)

initialfreecoins=2100000000000000
anyonecanspendaremine=1

Create a descriptor wallet

elements-cli -named createwallet wallet_name=descriptors_e1 descriptors=true

Wait for funds to mature

elements-cli -generate 101 

Check the balance

elements-cli getbalance

This should be equal to 2100000000000000, but is 0. The same works for non-descriptor wallets

Dominant language
C++
Stars
1.2k
Forks
418
Avg merge
1d 12h
Merged PRs (30d)
13

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ElementsProject/elements

All issues in ElementsProject/elements

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.