Skip to content
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

deploy: copy transaction expected to be changed #417

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions deploy/notary.go
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,8 @@ func makeUnsignedDesignateCommitteeNotaryTx(roleContract *rolemgmt.Contract, com
return nil, err
}

tx = tx.Copy()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enough to copy and modify Signers if !tx.Signers[0].Account.Equals(sharedTxData.sender) only

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is kinda hotfix to me, i do not agree with the code here, so something different can be done here in the future. do you really need one more if here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, this func is called only if !sharedTxDataMatches so suggested if is already done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i do not agree with the code here, so something different can be done here in the future

then issue or to draft

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is kinda hotfix to me

nvm, we dont modify other ref type fields, so copy only Signers


tx.ValidUntilBlock = sharedTxData.validUntilBlock
tx.Nonce = sharedTxData.nonce
tx.Signers[0].Account = sharedTxData.sender
Expand Down
Loading