ElementsProject / ElementsProject/elements

Long unconfirmed transaction chain doesn't get mined in regtest

Open
#1,088 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.2k
Forks
416
Avg merge
1d 23h
Merged PRs (30d)
15

Description

Steps to reproduce (with 0.21.0.1):

```bash
elementsd -chain=elementsregtest -initialfreecoins=2100000000000000 -anyonecanspendaremine=1 -validatepegin=0 -datadir=/tmp/elements-test

alias cli='elements-cli -chain=elementsregtest -datadir=/tmp/elements-test'

cli createwallet default
cli rescanblockchain # pick up anyonecanspend

addr=$(cli getnewaddress)
for i in {1..26}; do cli sendtoaddress $addr 1; done

# the 26th transaction results in the following log message:
# [default] CommitTransaction(): Transaction cannot be broadcast immediately, too-long-mempool-chain, too many unconfirmed ancestors [limit: 25]
# (but `sendtoaddress` still replies successfully with its txid)

cli getmempoolinfo | jq .size
# prints 25 (the 26th transaction was ignored)

cli generatetoaddress 1 $addr

cli getmempoolinfo | jq .size
# still prints 25 -- all the transactions seem to be stuck in the mempool and don't get selected into mined blocks
```

#206 reported a similar issue (but possibly due to a different cause?).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.