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

feat: handling the vertex_removed event #182

Merged
merged 9 commits into from
Oct 7, 2024
Merged

Conversation

andreabadesso
Copy link
Collaborator

@andreabadesso andreabadesso commented Jul 30, 2024

Motivation

  • We should handle the VERTEX_REMOVED event
  • We should have balance integration tests for the invalid_mempool scenario
  • We should fix multiple db methods that were failing on empty params

Acceptance Criteria

  • Include here all things that this PR should solve

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged
  • Make sure either the unit tests and/or the QA tests are capable of testing the new features
  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@andreabadesso andreabadesso self-assigned this Jul 30, 2024
@andreabadesso andreabadesso added the enhancement New feature or request label Jul 30, 2024
glevco
glevco previously approved these changes Oct 1, 2024
@@ -497,6 +497,10 @@ export const updateAddressTablesWithTx = async (
timestamp: number,
addressBalanceMap: StringMap<TokenBalanceMap>,
): Promise<void> => {
if (Object.keys(addressBalanceMap).length === 0) {
// No need to do anything here, the transaction most likely has no inputs and outputs
Copy link

Choose a reason for hiding this comment

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

"most likely"? Is it possible that this is not the case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No.

Removed the comment

Copy link

Choose a reason for hiding this comment

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

Did you push it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ops, I pushed it to the invalid scripts branch, just cherry-picked it, can you check again?

r4mmer
r4mmer previously approved these changes Oct 7, 2024
@andreabadesso andreabadesso dismissed stale reviews from r4mmer and glevco via c90f8db October 7, 2024 15:49
@andreabadesso andreabadesso merged commit 44b7615 into master Oct 7, 2024
1 check passed
@andreabadesso andreabadesso deleted the feat/vertex-removed branch October 7, 2024 17:54
@andreabadesso andreabadesso mentioned this pull request Dec 9, 2024
2 tasks
andreabadesso added a commit that referenced this pull request Dec 9, 2024
* chore: deploy Nano Testnet (#168)

* fix: fetchMinRewardBlocks fails when reward_min_blocks is 0 (#177)

* fix: handle tx with no inputs and outputs (#178)

* chore: added NODE_ENV to integration tests

* fix: stop failing when there are no address balance on a transaction

* tests: added tests for the voidTransaction method

* chore: re-add test_images_down

* feat: allow sending alerts to another account (#179)

* fix: handle tx with no inputs (#181)

* tests: added tests for the voidTransaction method

* chore: re-add test_images_down

* fix: markUtxosAsVoided should not throw when inputs are empty

* fix: returning empty object on db utils and added test for services including db

* tests: fix invalid order of calls

* tests: missing tests [part 1/2] (#183)

* tests: added missing tests

* tests: added missing tests for nft push

* chore: added docker-compose to flake

* tests: ts-ignore -> ts-expect-error

* feat: handling the vertex_removed event (#182)

* feat: handling the vertex_removed event

* fix: handling empty arrays on IN conditions

* feat: handling VERTEX_REMOVED event

* tests: fix last event

* feat: voiding and removing transaction on vertex_removed event

* tests: added tests for empty array errors

* chore: using port 8085

* chore: actually using 8085

* refactor: removed misleading comment

* ci: support sub-accounts (#184)

* fix: non-standard scripts (#185)

* fix: handling utxos with empty scripts being spent

* refactor: helper to roll until an event

* chore: using latest :stable on custom and empty script docker compose

* refactor: removed unused logs

* chore: using fixed dependencies for all projects (#186)

* fix: updated balances and network name (#196)

* fix: updated throttling lib causing deploy to fail (#195)

* fix: updated firebase-admin lib version and deprecated sendMulticast (#194)

* fix: updated firebase-admin lib version and deprecated sendMulticast

* fix: tests mocking sendMulticast instead of the correct method

* fix: slow address generation (#199)

* chore: bumped to v1.6.3 (#200)

---------

Co-authored-by: Luis Helder <[email protected]>
@andreabadesso andreabadesso mentioned this pull request Dec 11, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants