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

fixes genesis block transaction status #3634

Merged
merged 1 commit into from
Mar 10, 2023
Merged

Conversation

hughy
Copy link
Contributor

@hughy hughy commented Mar 10, 2023

Summary

all transactions on the genesis block are confirmed.

'wallet:balance --all' shows a 'confirmed' balance of 0 for the genesis account when the chain contains only the genesis block.

fixes calculation of confirmed balance by ensuring that the range of unconfirmed sequences starts at at least 2

'wallet:transactions' shows a single 'unconfirmed' transaction for the genesis account when the chain contains only the genesis block.

fixes display of transaction status by checking if transaction has sequence equal to genesis block sequence

Testing Plan

Before:
image

After:
image

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and
what additional work is required, if any.

[ ] Yes

all transactions on the genesis block are confirmed.

'wallet:balance --all' shows a 'confirmed' balance of 0 for the genesis account
when the chain contains only the genesis block.

fixes calculation of confirmed balance by ensuring that the range of unconfirmed
sequences starts at at least 2

'wallet:transactions' shows a single 'unconfirmed' transaction for the genesis
account when the chain contains only the genesis block.

fixes display of transaction status by checking if transaction has sequence
equal to genesis block sequence
@hughy hughy requested a review from a team as a code owner March 10, 2023 01:55
Copy link
Contributor

@ygao76 ygao76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, can you test it with regular account so it does not break any common use cases.

@hughy
Copy link
Contributor Author

hughy commented Mar 10, 2023

Looks good, can you test it with regular account so it does not break any common use cases.

Tested with a wallet on the Phase 3 network.

Steps:

  • Send transaction from account 'test' to default account, 'hughy-if', using '--watch' to watch transaction progress

  • Wait until transaction is unconfirmed

  • Stop node

  • View balances and transactions list to confirm that transaction status is correctly tracked as unconfirmed
    image

  • Restart node, continue watching transaction with 'wallet:transaction:watch' until confirmed

  • View balances and transactions list to see that the transaction is labeled as confirmed
    image

@hughy hughy merged commit aacffc5 into staging Mar 10, 2023
@hughy hughy deleted the fix/genesis-tx-status branch March 10, 2023 02:25
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

Successfully merging this pull request may close these issues.

None yet

2 participants