Skip to content

Long unconfirmed transaction chain doesn't get mined in regtest #1088

@shesek

Description

@shesek

Steps to reproduce (with 0.21.0.1):

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?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions