fix: Rename memo field to topicMemo to eliminate name collision#2477
Conversation
Signed-off-by: iron-prog <dt915725@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
WalkthroughTopic create and update transactions now store topic-level memos in ChangesTopic memo separation
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
📋 Issue PlannerBuilt with CodeRabbit's Coding Plans for faster development and fewer bugs. View plan used: ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/hiero_sdk_python/consensus/topic_update_transaction.py (1)
36-36: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winMAJOR — Make the auto-renew default unset unless explicitly requested.
Proto field:
autoRenewPeriod. Issue type: Missing field handling / update semantics. The constructor still defaultsauto_renew_periodtoDuration(7890000), so every TopicUpdate without an explicit auto-renew request serializes that value and can silently overwrite the on-chain value.Use
auto_renew_period: Duration | None = Nonein the constructor, keep the current guard in_build_proto_body(), and add a test thatTopicUpdateTransaction(topic_id).build_transaction_body()does not setautoRenewPeriod.Source: Path instructions
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: b75c7aba-facc-4a10-b74f-9f8ab18ba309
📒 Files selected for processing (4)
src/hiero_sdk_python/consensus/topic_create_transaction.pysrc/hiero_sdk_python/consensus/topic_update_transaction.pytests/unit/topic_create_transaction_test.pytests/unit/topic_update_transaction_test.py
Signed-off-by: iron-prog <dt915725@gmail.com>
5a14542 to
aeeaa92
Compare
memo field to topicMemo to eliminate name collision
- Preserve unset topic memos by storing None instead of collapsing to "" - Add protobuf regression tests for topic and transaction memo serialization - Verify unset and empty topic memos serialize correctly Signed-off-by: iron-prog <dt915725@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #2477 +/- ##
=======================================
Coverage 95.27% 95.27%
=======================================
Files 164 164
Lines 10483 10483
=======================================
Hits 9988 9988
Misses 495 495 🚀 New features to boost your workflow:
|
exploreriii
left a comment
There was a problem hiding this comment.
TopicCreateTransaction.memo and TopicUpdateTransaction.memo now refer to the transaction-level memo, that the topic memo moved to .topic_memo, and that set_memo() / set_transaction_memo() are unaffected — so anyone using the setters, including the TCK handler needs no changes. Only direct attribute access does
|
👋 Hi @iron-prog! Great work completing a Intermediate issue! 🎉 Thanks for your contribution! 🚀 🏆 Milestone unlocked: you've reached Advanced level! 🎉 Here are some issues you might want to explore next:
🌟 Stay connected: Happy coding! 🚀 |
Description:
Prevent collisions between topic memos and transaction memos in
TopicCreateTransactionandTopicUpdateTransaction.Related issue(s):
Fixes #2473
Notes for reviewer:
Checklist