Why confirmations = -1?

+2 votes
I found a transaction while its confirmations = -1

Is this a invalid transaction?

In what case this phenomenon will happen?

IF A 's balance = 100, B's balance = 0

A send 10 assets to B, but this transaction's confirmations = -1

What is A 's balance and B's balance ?

Thanks.
asked Jul 18, 2018 by allainzhang2018

2 Answers

+1 vote
Please clarify which API you were using when you saw this, and whether there is a possibility of a double-spend (conflicting transaction). Usually this will only happen if you have nodes sharing private keys and generating transactions simultaneously.
answered Jul 19, 2018 by MultiChain
I used listaddresstransactions and found confirmation = -1.
+1 vote
This happens for transactions which are indexes by the wallet, but are not in the active blockchain or in the memory pool. This means that the transaction can now not be confirmed, because it is in conflict with other transactions. It could happen if you share private keys between nodes and send transactions simultaneously from those two nodes for the same address. Or if some transaction was rendered invalid by a permissions change in another transaction.
answered Jul 22, 2018 by MultiChain
...