Skip to content

Conversation

ac4ch
Copy link
Collaborator

@ac4ch ac4ch commented Aug 22, 2025

Description of Changes

Provide a brief description of the changes you've made.

Linked Issues / Tickets

Reference any related issues or tickets, e.g. "Closes #123".

Testing Procedure

Describe the tests you've added or any testing steps you've taken.

  • I have added new unit tests
  • All tests pass locally
  • I have tested manually in my local environment

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have run the linter

Copy link
Contributor

Manual Tests

ℹ️ Remember to ask team members to perform manual tests and to assign tested label after testing.

@ac4ch ac4ch self-assigned this Aug 22, 2025
@ac4ch ac4ch added the feature Any new significant addition label Aug 22, 2025
@ac4ch ac4ch added this to the Wallet SQL storage milestone Aug 22, 2025
@ac4ch ac4ch linked an issue Aug 22, 2025 that may be closed by this pull request
@chris-4chain chris-4chain requested a review from Copilot August 22, 2025 12:38
Copilot

This comment was marked as outdated.

@ac4ch ac4ch force-pushed the feat/crud_for_knownTx_enity_part2 branch from d26d1e0 to f83a827 Compare August 25, 2025 11:01
@ac4ch ac4ch requested a review from chris-4chain August 25, 2025 11:02
@ac4ch ac4ch requested a review from chris-4chain August 26, 2025 06:20
@chris-4chain chris-4chain requested a review from Copilot August 26, 2025 06:57
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements CRUD operations for the knownTx entity by adding extensive filter functionality and comprehensive test coverage. The changes enable querying transactions by various criteria including status, block information, and notification state.

  • Adds new filter conditions for BlockHeight, BlockHash, MerkleRoot, Status, and Notified fields
  • Implements comprehensive test suite covering all new filter operations
  • Enhances the query builder with new condition types for booleans and string enums

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/storage/provider_known_tx_enity_test.go Adds comprehensive test coverage for all new filter conditions
pkg/storage/internal/testabilities/utils.go Provides test utility functions for random data generation
pkg/storage/internal/testabilities/assertions_db_state.go Adds new assertion methods for testing database state
pkg/storage/crud/known_tx.go Implements new filter methods for the KnownTxReader interface
pkg/storage/crud/enum_condition.go Creates new condition type for string-based enums
pkg/storage/crud/bool_condition.go Creates new condition type for boolean fields
pkg/services/services_types.go Adds ScriptHasher interface definition
pkg/internal/testabilities/testservices/fixture_arc.go Adds mock method for testing block height scenarios
pkg/internal/storage/repo/known_tx.go Implements actual database condition logic
pkg/internal/storage/repo/gen_cmp_condition.go Adds specialized boolean comparison handling
pkg/entity/known_tx.go Extends specification with new filterable fields
pkg/entity/comparable.go Adds string conversion and operator string representation
Comments suppressed due to low confidence (1)

pkg/storage/provider_known_tx_enity_test.go:1

  • The filename contains a typo: 'enity' should be 'entity'.
package storage_test

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ac4ch ac4ch force-pushed the feat/crud_for_knownTx_enity_part2 branch from 4b8ffe3 to be3a9ad Compare August 26, 2025 07:21
@ac4ch ac4ch force-pushed the feat/crud_for_knownTx_enity_part2 branch from 92f1992 to 7de3486 Compare August 26, 2025 14:04
@ac4ch ac4ch requested a review from chris-4chain August 26, 2025 14:05
Copy link

@ac4ch ac4ch merged commit 03b68ff into main Aug 27, 2025
10 checks passed
@ac4ch ac4ch deleted the feat/crud_for_knownTx_enity_part2 branch August 27, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Any new significant addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] CRUD for knownTx entity [FEATURE] internalizeAction MVP on sql storage
5 participants