test: verify memo in raw_data and fix formatting
What changed, and why it matters
This commit only adds a new test assertion to existing Rust test code. It checks that the transaction memo matches the raw_data.data field in a Tron transaction test. There is no change to production code, no bug fix, and no security-relevant behavior change.
No security action needed. Treat as routine test maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds two lines inside a Rust unit test in rust/apps/tron/src/transaction/wrapped_tron.rs. It retrieves the raw_data of a constructed Tron transaction and asserts that tx.memo.as_bytes().to_vec() equals raw_data.data. This is purely a test-hardening change verifying an existing invariant; no implementation code was modified.
Changed components
rust/apps/tron/src/transaction/wrapped_tron.rs (test module only)Inspect captured patch +2 / −0
diff --git a/rust/apps/tron/src/transaction/wrapped_tron.rs b/rust/apps/tron/src/transaction/wrapped_tron.rs
index 864d1d0..56b239b 100644
--- a/rust/apps/tron/src/transaction/wrapped_tron.rs
+++ b/rust/apps/tron/src/transaction/wrapped_tron.rs
@@ -896,5 +896,7 @@ mod tests {
"=:ETH.USDT:0x742636d8FBD2C1dD721Db619b49eaD254385D77d:3816100/3/0:-_/nc:20/0",
tx.memo
);
+ let raw_data = tx.tron_tx.raw_data.as_ref().expect("raw_data should exist");
+ assert_eq!(tx.memo.as_bytes().to_vec(), raw_data.data);
}
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.