bcoin-org/bcash

confirmations issue

Closed this issue · 4 comments

I have find also one issue.
when transaction was confirmed its worked correct.

{ hash: "6ad596961dce18d3aa189335f1cdd7340b9fd33407013e8ce88823dcdbb2605d", fee: 0, rate: 0, mtime: 1530011839, height: 536356, block: "0000000000000000007bbc99da84bba488da76f3e81d582eb4c9385d106a941f", time: 1530011795, index: 3, version: 1, inputs: [ { prevout: { hash: "b8f4acb87d0d7c6da0c2c505d69f53d060e70292949d3abbc8d9885906550200", index: 1, }, script: "483045022100cdf8c64b6650056273924f0adbc876a57e967654311dee9294d7b4b7dc3256ed02202a2a480b68b8a8c6faac493da9b62c16375907d98b772dc69725e625dd461ce441210386260469a4f4dd2115c7b700bb8a7b70fc1edb5f97dd1bda7aa00cf3869b4e1e", sequence: 4294967294, address: "bitcoincash:qr3e4qkual3wmutjae5lc98whyrjw3v8qsny83k8zz", } ], outputs: [ { value: 423199700, script: "76a914f7c86badc2aef379190e38b4ffc2aea7111356d188ac", address: "bitcoincash:qrmus6adc2h0x7gepcutfl7z46n3zy6k6yme7vrt42", }, { value: 576800000, script: "76a914d5046a06900312299addd8ec640c3480aa417bbf88ac", address: "bitcoincash:qr2sg6sxjqp3y2v6mhvwceqvxjq25stmhums6njkpv", }, ], locktime: 536355, hex: "0100000001000255065988d9c8bb3a9d949202e760d0539fd605c5c2a06d7c0d7db8acf4b8010000006b483045022100cdf8c64b6650056273924f0adbc876a57e967654311dee9294d7b4b7dc3256ed02202a2a480b68b8a8c6faac493da9b62c16375907d98b772dc69725e625dd461ce441210386260469a4f4dd2115c7b700bb8a7b70fc1edb5f97dd1bda7aa00cf3869b4e1efeffffff02d4833919000000001976a914f7c86badc2aef379190e38b4ffc2aea7111356d188ac00456122000000001976a914d5046a06900312299addd8ec640c3480aa417bbf88ac232f0800", confirmations: 7, }

confirmations: 7 is ok.
if transaction was unconfirmed it should be 0.
but it is height + 2.

I think this is the same bug:

bcoin-org/bcoin#461

@nodar-chkuaselidze do you have time to review this PR for bcash and bcoin?

Stay tuned :-) the fix is being reviewed now and hopefully will be merged soon.

Fixed in 16c8e40