Issue Details
- Number
- 29711
- Title
- Wallet: Nondescript error message for 502nd unconfirmed transaction
- Description
- ### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current behaviour
When creating a large number of unconfirmed transactions (e.g. 500+) with `bitcoin-cli` by spending/sending from a wallet, sending/spending the 502nd time results in a nondescript error message. It may be the case that this is expected behavior (e.g. reaching a limit), and the error message could be made more descriptive/informative.
```
error code: -1
error message:
map::at
```
This was encountered when creating a test to populate the mempool with a high number of transactions for the v27.0 RC Testing Guide. This behavior was observed both on v26.0 and v27.0 rc1.
Confirming the transactions in a block allows the user to perform additional spending.
### Expected behaviour
A more descriptive error message would be provided to the user. In this case, if a limit is being reached, the user could be informed and take appropriate action (e.g. wait until a block confirms transactions, etc.).
### Steps to reproduce
Start a node on regtest with its own datadir/bitcoin.conf:
```bash
export DATA_DIR=/tmp/tmpdatadir
mkdir $DATA_DIR
export BINARY_PATH=/path/to/dir/containing/bitcoind
alias bitcoind-test="$BINARY_PATH/bitcoind -datadir=$DATA_DIR"
alias bcli="$BINARY_PATH/bitcoin-cli -datadir=$DATA_DIR"
echo "regtest=1" > $DATA_DIR/bitcoin.conf
bitcoind-test -daemon
```
Create a wallet, fund it with coinbase outputs, and send 501 times:
```bash
bcli createwallet test
export ADDRESS=$(bcli -rpcwallet=test getnewaddress)
bcli -rpcwallet=test -generate 701
for i in $(seq 1 499); do bcli -rpcwallet=test -named send outputs="{\"$ADDRESS\": 1}" fee_rate=10; done
bcli -rpcwallet=test getmempoolinfo
bcli -rpcwallet=test -named send outputs="{\"$ADDRESS\": 1}" fee_rate=10
bcli -rpcwallet=test getmempoolinfo
bcli -rpcwallet=test -named send outputs="{\"$ADDRESS\": 1}" fee_rate=10
bcli -rpcwallet=test getmempoolinfo
```
Induce the error on the 502nd send:
```bash
bcli -rpcwallet=test -named send outputs="{\"$ADDRESS\": 1}" fee_rate=10
error code: -1
error message:
map::at
```
Confirm transactions, then add a new transaction:
```bash
bcli -rpcwallet=test -generate 1
bcli -rpcwallet=test -named send outputs="{\"$ADDRESS\": 1}" fee_rate=10
bcli -rpcwallet=test getmempoolinfo
```
### Relevant log output
Nothing relevant observed in debug.log at the time of the error received.
### How did you obtain Bitcoin Core
Pre-built binaries
### What version of Bitcoin Core are you using?
v26.0.0
### Operating system and version
Ubuntu 22.04 LTS
### Machine specifications
amd64
- URL
-
https://github.com/bitcoin/bitcoin/issue/29711
- Closed by
-
Back to List