mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-24 15:56:42 +00:00

* [DEV-75] Removed fetchEntryByHash, which was no longer used. * [DEV-75] Removed a few functions in manager.go that weren't used by anything. * [DEV-75] checkConnectBlock will soon not accept a utxoViewpoint, so removed the call to view.Tip() so that it could be deleted. * [DEV-75] Got rid of tips in UtxoViewpoint. * [DEV-75] Added the full UTXO set to the virtual block. * [DEV-75] Implemented UTXO-wrangling when adding a new block. * [DEV-75] Added isCoinbase to utxoEntry creation. * [DEV-75] Added blockHeight to utxoEntry creation. * Implemented fetching the fullUTXOSet from the database. * [DEV-75] Simplified DAGState because almost all of the state in it was unnecessary. Also got rid of dbDAGState. * [DEV-75] Made the process around adding a new block, UTXO-wise, much safer. * [DEV-75] Implemented melding the virtual UTXO diff to the database. * [DEV-75] Fixed utxoSet loading from the wrong bucket. * [DEV-75] Began pruning utxoviewpoint.go. Replaced FetchUtxoEntry with a fullUTXOSet-based GetUTXOEntry. * [DEV-75] Removed fetchUtxos. * [DEV-75] Moved GetUTXOEntry into the virtual block. * [DEV-75] Updated IndexManager to not use utxoViewpoints. * [DEV-75] Fixed some bad login in restoreUTXO involving nodeDiffs. * [DEV-75] Got rid of the UTXO spend journal, which wasn't used anywhere. * [DEV-75] Moved some STXO-related validation logic out of connectToDAG and into checkConnectBlock. * [DEV-75] Renamed UtxoXxx to UTXOXxx. Removed a bunch of methods that were no longer used by anything. * [DEV-75] Another Utxo -> UTXO rename. * [DEV-75] Removed IsModified from UTXOView, which was not used anywhere. * [DEV-75] Renamed nodeDiff to provisionalNode. Added a bunch of comments. * [DEV-75] Removed the test for genesis in pastUTXO, since it can never happen. * [DEV-75] Wrote tests for errors in pastUTXO. * [DEV-75] Wrote tests for errors in restoreUTXO. * [DEV-75] Improved testErrorThroughPatching. * [DEV-75] Wrote tests for errors in verifyAndBuildUTXO. * [DEV-75] Used TipHashes instead of tips().hashes(), fixed comments in a few places, and brought back an error return that I erroneously removed. * [DEV-75] Removed UTXO set logs. * [DEV-75] Recreated add/remove/contains functions for utxoCollection. * [DEV-75] Changed newUTXOEntry to use an object initializer. * [DEV-75] Changed the UTXO bucket version to 1. * Added a comment that clarifies that the index is not initialized before initDAGState is called. * [DEV-75] Renamed GetVirtualBlock to VirtualBlock. * [DEV-75] Removed superfluous variables. * [DEV-75] Combined connectBlockToParents with updateParentsDiffs. * [DEV-75] Removed another superfluous variable. * [DEV-75] In pastUTXO, first fetch transactions from the database and only then add them. * [DEV-75] Reworded the comment for commit(). * [DEV-75] Made all the connectUTXO subfunctions not BlockDAG methods. * [DEV-75] Updated the comment for connectUTXO. * [DEV-75] Updated the comment explaining why we're creating provisionalNodes. * [DEV-75] Removed a couple of unnecessary calls to toProvisionalNode. * [DEV-75] Renamed connectUTXO to applyUTXOChanges. * [DEV-75] Replaced allProvisionalNodes with provisionalNodeSet, an object that holds provisionalNodes for this particular call to applyUTXOChanges. * [DEV-75] Changed createProvisionalNode to accept a boolean "withParents" instead of relying on the caller to supply the node's parents or an empty set. * [DEV-75] Made most applyUTXOChanges subfunctions be methods on provisionalNode. * [DEV-75] Fixed a couple of bad comments. * [DEV-75] Added descriptive error messages to callers of applyUTXOChanges. * [DEV-75] Fixed weird English. * [DEV-75] Replaced DAGState with a slice of DAG tip hashes. * [DEV-75] In createProvisionalNode, changed withParents to withRelatives to avoid certain kinds of attacks. * [DEV-75] Renamed createdProvisionalNode to newProvisionalNode. * [DEV-75] Added precalculating the amount of transactions inside a new block's blue set. * [DEV-75] Pruned unnecessary variable.