-
Notifications
You must be signed in to change notification settings - Fork 190
feat: add set_node_account_ids to the query chain #1727
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
base: main
Are you sure you want to change the base?
feat: add set_node_account_ids to the query chain #1727
Conversation
Signed-off-by: Antonio Ceppellini <antonio.ceppellini@gmail.com>
|
Hi, this is MergeConflictBot. Please resolve these conflicts locally and push the changes. Quick Fix for CHANGELOG.md ConflictsIf your conflict is only in CHANGELOG.md, you can resolve it easily using the GitHub web editor:
For all other merge conflicts, please read: Thank you for contributing! |
WalkthroughPins receipt queries in TransactionResponse.get_receipt() to the submitting node by calling Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client
participant TxResponse as TransactionResponse
participant ReceiptQ as TransactionGetReceiptQuery
participant NodeA as "Node 0.0.3"
participant NodeB as "Node 0.0.4"
Client->>TxResponse: response.get_receipt(client)
TxResponse->>ReceiptQ: new TransactionGetReceiptQuery()
ReceiptQ->>ReceiptQ: .set_transaction_id(txId)
ReceiptQ->>ReceiptQ: .set_node_account_ids([submittingNode])
ReceiptQ->>NodeA: execute(query)
alt NodeA returns non-retryable error
NodeA-->>ReceiptQ: error
ReceiptQ-->>Client: error
else NodeA returns SUCCESS
NodeA-->>ReceiptQ: receipt SUCCESS
ReceiptQ-->>Client: receipt SUCCESS
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Signed-off-by: Antonio Ceppellini <antonio.ceppellini@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
| assert hasattr(resp, 'transaction'), "Missing public attribute: transaction" | ||
|
|
||
| # Assert default values | ||
| assert resp.hash == bytes(), "Default hash should be empty bytes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Use b"" literal instead of bytes() call.
Per static analysis (ruff UP018), bytes() is an unnecessary call that can be replaced with the more idiomatic b"" literal.
♻️ Proposed fix
- assert resp.hash == bytes(), "Default hash should be empty bytes"
+ assert resp.hash == b"", "Default hash should be empty bytes"🧰 Tools
🪛 Ruff (0.14.14)
[warning] 34-34: Unnecessary bytes call (rewrite as a literal)
Replace with bytes literal
(UP018)
tech0priyanshu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hii @AntonioCeppellini great work done ... lgtm
|
some merge conflict @AntonioCeppellini |
manishdait
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just needs a rebase
…g-node-by-default Signed-off-by: AntonioCeppellini <128388022+AntonioCeppellini@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #1727 +/- ##
=======================================
Coverage 93.28% 93.28%
=======================================
Files 141 141
Lines 9100 9100
=======================================
Hits 8489 8489
Misses 611 611 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
|
just chagelog entry please |
Signed-off-by: Antonio Ceppellini <antonio.ceppellini@gmail.com>
aceppaluni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AntonioCeppellini Great work!
Once rebased, happy to approve and merge!
MonaaEid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description:
This PR updates
TransactionResponse.get_receipt()addingset_node_account_ids([self.node_id])to the query chainwe now
self.node_id)Related issue(s):
Fixes #1686
Notes for reviewer:
Checklist