-
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
Transaction testing framework #422
base: main
Are you sure you want to change the base?
Conversation
…ects...; add postgres support and tests for access group create txn
…cess group members txn
…action testing framework
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 like this tests well, but it is a little confusing to go through this code. @diamondhands0 - feel free to look when you'd like to give some input here.
// IsDependency should return true if the other input space will have overlapping utxoView/utxoOps mappings or db records | ||
// with the current input space. This is used by the transactionTest framework to determine which transactionTestVector | ||
// will describe entries that will be flushed to the db after both test vectors are applied. | ||
// We assume that IsDependant is a symmetric relation, i.e. IsDependency(TV1, TV2) == IsDependency(TV2, TV1); however, |
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.
Dependent is misspelled.
transactionTestInputTypeAccessGroupCreate transactionTestInputType = iota | ||
transactionTestInputTypeAccessGroupMembers |
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.
Is there a reason we wouldn't just re-use TxnType instead of defining a new enum we need to update whenever we add a new transaction?
tes.testDisconnectBlock(tm, testVectorBlock) | ||
dbEntriesAfter := tes.GetAllStateDbEntries(tm) | ||
tes.compareBeforeAfterDbEntries(dbEntriesBefore, dbEntriesAfter) | ||
glog.Infof(CLog(Yellow, "RunBadgerTest: successfully connected/disconnected block and verified db state")) |
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 set a glog level such that our builds don't have all these print statements in them please? applies to all print statements.
|
||
// Fund provided public key with the desired amount of DeSo in nanos. | ||
func (tes *transactionTestSuite) fundPublicKey(tm *transactionTestMeta, publicKey PublicKey, amountNanos uint64) { | ||
// Note we don't need to pass Postgres here, because _doBasicTransferWithVieFlush takes it from Blockchain. |
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.
// Note we don't need to pass Postgres here, because _doBasicTransferWithVieFlush takes it from Blockchain. | |
// Note we don't need to pass Postgres here, because _doBasicTransferWithViewFlush takes it from Blockchain. |
No description provided.