-
Notifications
You must be signed in to change notification settings - Fork 109
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
draft atomic txns pr #932
Conversation
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
2dd1b9b
to
9abb579
Compare
9abb579
to
ca353cf
Compare
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( |
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.
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() |
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.
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 { |
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.
Seems it's not called in the _connect
No description provided.