Why do I have more unconfirmed tx than getmempool info reports?

0

I presently have 39 unconfirmed tx that I've sent according to my local bitcoind:

$ bitcoin-cli listunspent 0 0  | grep account | wc -l
39

(note: the above command gives the correct answer because the tx were sent to the same bitcoind wallet.)

I made a script to watch the mempool size via getmempoolinfo and record the high and low amounts. Here is output:

  size: 9359
  bytes: 9165998

  size_low: 16
  size_low_when: 2017-08-22T14:29:49-07:00

  size_hi: 71196
  size_hi_when: 2017-08-22T13:46:14-07:00

  bytes_low: 3063
  bytes_low_when: 2017-08-22T14:29:49-07:00

  bytes_hi: 53361196
  bytes_hi_when: 2017-08-22T13:46:14-07:00

  last_block_found: 2017-08-23T01:13:02-07:00

Notice that the smallest size that has been seen is 16. This comes from the "size" output of getmempool info, which according to the help docs indicates the number of tx in the mempool.

Seemingly then, getmempoolinfo was (for a brief time at least) reporting fewer tx in the mempool than the number of my own sent tx that are still unconfirmed.

How is that possible? Is this a bitcoind bug, or am I misunderstanding something?

$ bitcoin-cli help getmempoolinfo
getmempoolinfo

Returns details on the active state of the TX memory pool.

Result:
{
  "size": xxxxx                (numeric) Current tx count
  "bytes": xxxxx               (numeric) Sum of all tx sizes
}

Curious George

Posted 2017-08-23T08:30:58.283

Reputation: 11

3Hello George, you seemed to have put in some effort to write your question. Could you please return he question to its original state and post your edit as an answer? Perhaps other people would be interested in reading about this in the future.Murch 2017-08-26T22:33:28.693

@Curious George, I agree with Murch. This is an interesting question, and could be a problem that someone in the future may have. By answering your own question, you make it easier for someone else to find this solution, and will likely be rewarded with upvotes.Jestin 2017-08-27T17:53:54.027

Answers

1

You are misunderstanding how listunspent and getmempoolinfo works. listunspent is for your wallet only and is a wallet only RPC command. It will only show things that pertain to your wallet. However getmempoolinfo is a node RPC. It will show what your node sees, which is almost always going to be more than just the things in your wallet. These two commands are completely unrelated and work independent of each other. There is no relation between these two commands.

Andrew Chow

Posted 2017-08-23T08:30:58.283

Reputation: 40 910