MetacoSA / QBitNinja

An Open Source and powerful blockchain API
MIT License
68 stars 42 forks source link

Invalid balance on TestNet #79

Closed ArtjomP closed 5 years ago

ArtjomP commented 6 years ago

Hi there! I get balance this way:

var client = new QBitNinjaClient(Network.TestNet);
//pubKey.Hash is "36668c34beb6abebb83dcb6c41a6518be412acab"
var balanceModel = await client.GetBalance(pubKey.Hash, true);
var unspentOperations = balanceModel.Operations;

I get three operations to my address mkUbdYtNTs9Vds3YuBAGwirb2dkW3rC8Ph

  1. OK. 8e0a0be3653135e30ce8584bce8107ab738344606c19d20477e3c187f27baec9 this amount 0.001 is unspent yet.
  2. OK. 521ab422f10c47dae31256e6d0c987212044c6c03262e79d93acbd4000519933
  3. ERROR tx with id 72a72b623b875ae8d3c3b5e060a89ac89398429d4878a4ff9cb9ac04eb9e14c6 When I see it here blockcypher it shows me that 0.0000875 is unspent. But when I see it here www.blocktrail.com it shows me that 0.0000875 is spent already.

It seems that the third transaction is not confirmed because of the dust.

What can I do with it?

May be that's why I can't broadcast the transaction from Issue #78. BTW thank you for fixing it now I get the error and it brings me here :)

Thank you in advance.

NicolasDorier commented 6 years ago

Everybody agree that it is spent by fe4dd64ebc59249be73dd765c0bbe84e3f0e8d0e64996b15146ae4ab02949592 you might have delay, as testnet is pretty fucked up by someone now. (Lot's of blocks, reorg, and transactions)

NicolasDorier commented 6 years ago

I think the transaction fe4dd64ebc59249be73dd765c0bbe84e3f0e8d0e64996b15146ae4ab02949592 was just unconfirmed. Some block explorer had it in their mempool like QBit and other did not. The fees for testnet shot up to 1500 sat/b because of somebody trashing the network.

ArtjomP commented 6 years ago

Strange stuff. Now blockcypher shows that this 0.0000875 is spent too. Did anyone change anything? I'm just wandering.

ArtjomP commented 6 years ago

@NicolasDorier is it an issue that QBitNinja showed me that the transaction is unspent while it was unconfirmed?

NicolasDorier commented 6 years ago

@ArtjomP QBitNinja "forget" a transaction if it takes too much time to be confirmed. You may have hit this.