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

draft atomic txns pr #932

Closed
wants to merge 1 commit into from
Closed

Conversation

lazynina
Copy link
Member

No description provided.

@lazynina
Copy link
Member Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@lazynina lazynina force-pushed the draft-atomic-txns branch 4 times, most recently from 2dd1b9b to 9abb579 Compare January 23, 2024 03:51
return 0, 0, nil, errors.Wrapf(err, "_connectAtomicTxns: Problem serializing txn: ")
}
// Connect the transaction and update the view.
innerUtxoOps, innerTotalInput, innerTotalOutput, innerFees, err := viewCopy.ConnectTransaction(
Copy link
Member

Choose a reason for hiding this comment

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

Hmm... it doesn't make a practical difference but I feel a little more comfortable calling the _connectTransaction version here since it's kindof an internal connection.

var utxoOps []*UtxoOperation
// Create copy of view. We apply all transactions to the copy first, and then
// if successful, apply to the real view.
viewCopy, err := bav.CopyUtxoView()
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you need to do this viewCopy thing. Why not just error if you fail on one of the txns? It's already understood that the view will be compromised if an error happens in the middle of connecting a txn right?

}

// TODO: more validations
func (bav *UtxoView) _verifyAtomicTxn(txn *MsgDeSoTxn) error {
Copy link
Member

Choose a reason for hiding this comment

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

Seems it's not called in the _connect

@lazynina lazynina closed this Apr 9, 2024
@lazynina lazynina deleted the draft-atomic-txns branch April 9, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants