Skip to content

Conversation

@chris124567
Copy link
Member

@chris124567 chris124567 commented Jan 8, 2026

This solves the backend part of #291

I was mistaken in the dev sync about this already being partially complete, I was looking at unpushed code...

Copilot AI review requested due to automatic review settings January 8, 2026 22:25
@github-project-automation github-project-automation bot moved this to In Progress in Sia Jan 8, 2026
Copy link

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 pull request adds support for looking up unconfirmed transactions from the transaction pool. When a transaction is queried by ID and not found in the database, the API now checks the unconfirmed transaction pool before returning a 404 error.

Key changes:

  • Added Unconfirmed boolean field to Transaction and V2Transaction types to distinguish between confirmed and unconfirmed transactions
  • Implemented UnconfirmedTransaction and UnconfirmedV2Transaction methods in the Explorer to search the transaction pool
  • Updated transaction API handlers to fall back to checking the unconfirmed pool when transactions are not found in the database

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
explorer/types.go Added Unconfirmed field to Transaction and V2Transaction structs with omitempty JSON tag
explorer/explorer.go Implemented UnconfirmedTransaction and UnconfirmedV2Transaction methods to search the transaction pool
explorer/events.go Modified CoreToExplorerV1Transaction and CoreToExplorerV2Transaction to set Unconfirmed flag
api/server.go Updated transaction handlers to check unconfirmed pool as fallback; added interface methods
api/api_test.go Added tests for confirmed and unconfirmed V1 transaction lookup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chris124567 chris124567 marked this pull request as draft January 8, 2026 22:31
@chris124567 chris124567 force-pushed the christopher/support-unconfirmed-transactions-lookup branch from b9306be to caab760 Compare January 8, 2026 22:33
@chris124567 chris124567 marked this pull request as ready for review January 8, 2026 22:39
ChrisSchinnerl

This comment was marked as resolved.

@ChrisSchinnerl ChrisSchinnerl merged commit 0e833d8 into master Jan 12, 2026
10 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the christopher/support-unconfirmed-transactions-lookup branch January 12, 2026 20:34
@github-project-automation github-project-automation bot moved this from In Progress to Done in Sia Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants