-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Update transaction_metadata.rs #15215
Conversation
⏱️ 1h 30m total CI duration on this PR
|
@@ -55,6 +55,9 @@ impl TransactionMetadata { | |||
.collect(), | |||
sequence_number: txn.sequence_number(), | |||
fee_payer: txn.authenticator_ref().fee_payer_address(), | |||
// `fee_payer_authentication_key` is `None` if the TransactionAuthenticator | |||
// lacks an authenticator for the fee payer. It is `Some([])` if the | |||
// authenticator for the fee payer is a NoAccountAuthenticator. | |||
fee_payer_authentication_key: txn.authenticator().fee_payer_signer().map(|signer| { |
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.
Can we have this as a doc string /// None if ..., ...
for the field in TransactionMetadata
, rather then somewhere in the constructor?. Also let's add a unit test that checks this invariant
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.
Also, you can use [TransactionAuthenticator]
to make structs searchable in IDE + when refactoring and checking usages (works with ///
). Otherwise we change names, but the comments stay stale :(
f6483f4
to
f95bef9
Compare
Added a comment to explain `fee_payer_authentication_key` in transaction_metadat.rs
f95bef9
to
e1fd0f1
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Added a comment to explain
fee_payer_authentication_key
in transaction_metadat.rsType of Change