Conversation
Signed-off-by: Ravindra Meena <rmeena840@gmail.com>
Contributor
Reviewer's GuideAdds support for skipping inactive nBTC deposit addresses during deposit discovery, with corresponding tests and cleanup of outdated TODO comments. Sequence diagram for skipping inactive nbtc deposit addressessequenceDiagram
participant Caller
participant Indexer
participant Logger
Caller->>Indexer: findNbtcDeposits(tx, network)
activate Indexer
loop for each vout in tx.vout
Indexer->>Indexer: btcAddress = fromOutputScript(vout.script, network)
Indexer->>Indexer: depositInfo = nbtcDepositAddrMap.get(btcAddress)
alt no_deposit_info
Indexer-->>Indexer: continue to next vout
else deposit_info_found
alt deposit_inactive
Indexer->>Logger: debug(msg=Skipping inactive deposit address, txId, btcAddress)
Indexer-->>Indexer: continue to next vout
else deposit_active
Indexer->>Indexer: config = getPackageConfig(depositInfo.setup_id)
Indexer-->>Indexer: record matching nbtc deposit output
end
end
end
Indexer-->>Caller: deposits[]
deactivate Indexer
Updated class diagram for Indexer nbtc deposit address filteringclassDiagram
class Indexer {
Map~string, DepositInfo~ nbtcDepositAddrMap
findNbtcDeposits(tx, network) NbtcDeposit[]
getPackageConfig(setupId) PackageConfig
}
class DepositInfo {
number setup_id
boolean is_active
}
class NbtcDeposit {
string suiRecipient
number amount
string btcAddress
}
class PackageConfig {
number setup_id
}
Indexer --> DepositInfo : uses
Indexer --> NbtcDeposit : creates
Indexer --> PackageConfig : fetches
Indexer "1" o--> "*" nbtcDepositAddrMap : maintains
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In the new
should skip inactive deposit addressestest, consider restoringnbtcDepositAddrMapusing atry/finallyorafterEachhook instead of inline reassignment to avoid issues if an assertion throws and to make state cleanup more robust. - When logging skipped inactive deposit addresses, it might be useful to include the associated
setup_id(if available) in the log payload to make debugging and operational tracing easier.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the new `should skip inactive deposit addresses` test, consider restoring `nbtcDepositAddrMap` using a `try/finally` or `afterEach` hook instead of inline reassignment to avoid issues if an assertion throws and to make state cleanup more robust.
- When logging skipped inactive deposit addresses, it might be useful to include the associated `setup_id` (if available) in the log payload to make debugging and operational tracing easier.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
robert-zaremba
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes: #346
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!to the type prefix if API or client breaking changeCHANGELOG.mdSummary by Sourcery
Filter nBTC deposits to ignore inactive deposit addresses and add coverage for this behavior.
New Features:
Enhancements:
Tests: