Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Conversation

sisou
Copy link
Member

@sisou sisou commented Aug 27, 2020

When a transaction gets confirmed and the Client._onConfirmedTransaction() method is called, it is passed two blocks: the current block at which height the tx received enough confirmations to be CONFIRMED, and the current head block of the chain.

The current calculation sets the number of confirmations reported in the TransactionDetails to 1 (if both blocks given to the method are the same, which is the case for regular head changes (not rebranches)), and not to the number the tx actually has.

@sisou sisou requested a review from mar-v-in August 27, 2020 13:32
@sisou sisou self-assigned this Aug 27, 2020
dependabot bot and others added 7 commits October 12, 2020 12:47
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <[email protected]>
* Disable saucelabs tests
@styppo styppo force-pushed the soeren/client-confirmations branch from 52177cc to ee768a1 Compare October 12, 2020 14:30
@styppo styppo merged commit ee768a1 into master Oct 12, 2020
@styppo styppo deleted the soeren/client-confirmations branch October 12, 2020 14:33
@sisou
Copy link
Member Author

sisou commented Oct 12, 2020

The solution in this PR is actually not complete, if my argumentation is correct.

As the updated TransactionDetails that are generated when the tx confirms, are the block hash, height and timestamp of the current head block, not the one the tx was included in.

Therefore I think the logic needs to be changed to not only store the tx that waits for confirmation, but store its original including block data with it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants