Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confirmation number for sent BCH transaction does not increase #594

Open
bijakatlykkex opened this issue Aug 10, 2018 · 2 comments
Open

Comments

@bijakatlykkex
Copy link

Hello,

We have setup a bitcore node for Bitcoin Cash.

After successfully broadcasting a transaction using /api/tx/send, and after it gets mined and some more blocks also generated, the call to /api/tx/[txid] does return successfully but in the returned json confirmations keep to be 0.

{
  "txid": "...",
  "version": 1,
  "locktime": 0,
  "vin": [...],
  "valueIn": ... ,
  "fees": ... ,
  "vout": [ ... ],
  "confirmations": 0,
  "time": ... ,
  "valueOut": ... ,
  "size": ...
}

Confirmation for other transactions in the same block (not sent using the /api/tx/send) and also confirmations in /api/addr/[addr]/utxo is fine.

Helps appreciated,
Thank you

@bijakatlykkex
Copy link
Author

bijakatlykkex commented Aug 11, 2018

I managed to reproduce the issue on http://bch-insight.bitpay.com:

Confirmation=1
Confirmation=0

txids are the same, from url it could probably be found out the first url was captured before the second one, the first one has confirmation of 1, the second has the confirmation of 0 (it maybe needed to scroll to the end, for the confirmation field to be viewable).

One of our colleagues (@troshkin) found out that the problem could be overcomed by modifying a source line about cache, so we changed https://github.com/bitpay/bitcore-node/blob/master/lib/services/transaction/index.js#L29 to the following and problem does not appear anymore:

this._cacheTx = LRU({max:1000, maxAge : 1000 * 30});

@thackerronak
Copy link

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants