* [NOD-1048] Make leveldb compaction much less frequent. Also, allocate an entire gigabyte for leveldb's blockCache and writeBuffer.
* [NOD-1048] Implement changing the options for testing purposes.
* [NOD-1048] Rename originalOptions to originalLDBOptions.
* [NOD-1048] Add a comment.
* [NOD-1040] Don't remove DAG tips from the diffStore's loaded set
* [NOD-1040] Fix TestClearOldEntries.
* Revert "[NOD-1040] Fix TestClearOldEntries."
This reverts commit e0705814
* Revert "[NOD-1040] Don't remove DAG tips from the diffStore's loaded set"
This reverts commit d3eba1c1
* [NOD-1040] Increase maxBlueScoreDifferenceToKeepLoaded to 1500.
* [NOD-975] Don't include block transactions inside its UTXO commitment (#711)
* [NOD-975] Don't include block transactions inside its UTXO commitment.
* Revert "[NOD-975] Don't include block transactions inside its UTXO commitment."
This reverts commit b1a2ae66
* [NOD-975] Implement a (currently failing) TestUTXOCommitment.
* [NOD-975] Remove the block's own transactions from calcMultiset.
* [NOD-975] Simplify calcMultiset.
* [NOD-975] Add a comment on top of selectedParentMultiset.
* [NOD-975] Use pastUTXO instead of selectedParentUTXO in calcMultiset.
* [NOD-975] Use selected parent's pastUTXO instead of this block's pastUTXO in calcMultiset.
* [NOD-975] Extract selectedParentPastUTXO to a separate function.
* [NOD-975] Remove selectedParentUTXO from pastUTXO's return values.
* [NOD-975] Add txs to TestUTXOCommitment.
* [NOD-975] Remove debug code.
* [NOD-975] In pastUTXOMultiSet, copy the multiset to avoid modifying the original.
* [NOD-975] Add a test: TestPastUTXOMultiSet.
* [NOD-975] Improve TestPastUTXOMultiSet.
* [NOD-976] Implement tests for UTXO commitments (#715)
* [NOD-975] Don't include block transactions inside its UTXO commitment.
* Revert "[NOD-975] Don't include block transactions inside its UTXO commitment."
This reverts commit b1a2ae66
* [NOD-975] Implement a (currently failing) TestUTXOCommitment.
* [NOD-975] Remove the block's own transactions from calcMultiset.
* [NOD-975] Simplify calcMultiset.
* [NOD-975] Add a comment on top of selectedParentMultiset.
* [NOD-975] Use pastUTXO instead of selectedParentUTXO in calcMultiset.
* [NOD-975] Use selected parent's pastUTXO instead of this block's pastUTXO in calcMultiset.
* [NOD-975] Extract selectedParentPastUTXO to a separate function.
* [NOD-975] Remove selectedParentUTXO from pastUTXO's return values.
* [NOD-975] Add txs to TestUTXOCommitment.
* [NOD-976] Generate new blockDB blocks for tests.
* [NOD-976] Fix TestBlueBlockWindow.
* [NOD-976] Fix TestIsKnownBlock.
* [NOD-976] Fix TestGHOSTDAG.
* [NOD-976] Fix TestUTXOCommitment.
* [NOD-976] Remove kaka.
* [NOD-990] Save utxo diffs of past UTXO (#724)
* [NOD-990] Save UTXO diffs of past UTXO
* [NOD-990] Check for block double spends with its past instead of building its UTXO
* [NOD-990] Call resetExtraNonceForTest in TestUTXOCommitment
* [NOD-990] Remove redundant functions diffFromTx and diffFromAcceptedTx
* [NOD-990] Rename i->j to avoid confusion
* [NOD-990] Break long lines
* [NOD-990] Rename ErrDoubleSpendsWithBlockTransaction -> ErrDoubleSpendInSameBlock
* [NOD-990] Make ErrDoubleSpendInSameBlock more detailed
* [NOD-990] Add testProcessBlockRuleError
* [NOD-990] Fix comment
* [NOD-990] Add test for duplicate transactions on the same block
* [NOD-990] Use pkg/errors on panic
* [NOD-990] Make cloneWithoutBase method
* [NOD-990] Break long lines
* [NOD-990] Fix comment
* [NOD-990] Fix wrong variable names
* [NOD-990] Fix comment
* [NOD-974] Generate new test blocks.
* [NOD-974] Fix TestIsKnownBlock and TestGHOSTDAG.
* [NOD-974] Fix TestUTXOCommitment.
* [NOD-974] Fix comments
Co-authored-by: stasatdaglabs <39559713+stasatdaglabs@users.noreply.github.com>
Co-authored-by: stasatdaglabs <stas@daglabs.com>
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* [NOD-1001] Move side-effects of connection out of OnVersion
* [NOD-1001] Make AssociateConnection synchronous
* [NOD-1001] Wait for 2 veracks in TestPeerListeners
* [NOD-1001] Made AssociateConnection return error
* [NOD-1001] Remove temporary logs
* [NOD-1001] Fix typos and find-and-replace errors
* [NOD-1001] Move example_test back out of peer package + fix some typos
* [NOD-1001] Use correct remote address in setupPeersWithConns and return to address string literals
* [NOD-1001] Use separate verack channels for inPeer and outPeer
* [NOD-1001] Make verack channels buffered
* [NOD-1001] Removed temporary sleep of 1 second
* [NOD-1001] Removed redundant //
* [NOD-877] In UTXOEntry serialization, extract packedFlags out to a separate Uint8.
* [NOD-877] Generate new test blocks.
* [NOD-877] Fix TestIsKnownBlock.
* [NOD-877] Fix TestBlueBlockWindow.
* [NOD-877] Fix TestUTXOSerialization and TestGHOSTDAG.
* [NOD-877] Fix TestVirtualBlock.
* [NOD-1006] Make CompactToBig take an out param so that we can reuse the same big.Int in averageTarget.
* [NOD-1006] Fix merge errors.
* [NOD-1006] Use CompactToBigWithDestination only in averageTarget.
* [NOD-1006] Fix refactor errors.
* [NOD-1006] Fix refactor errors.
* [NOD-1006] Optimize averageTarget with a big.Int pool.
* [NOD-1006] Defer releasing bigInts.
* [NOD-1006] Use a pool for requiredDifficulty as well.
* [NOD-1006] Move the big int pool to utils.
* [NOD-1006] Remove unnecessary line.
* [NOD-1005] Moved isSyncedForMining to netsync manager, and renamed to isSynced + removed isCurrent
* [NOD-1005] Use sm.isSynced to check whether should request blocks from invs
* [NOD-1005] Use private version of isSynced to avoid infinite loop
* [NOD-1005] Fix a few typos
* [NOD-993] Use %+v when printing errors
* [NOD-993] Get rid of AssertError
* [NOD-993] Made ruleError use github.com/pkg/errors
* [NOD-993] remove redundant TODO
* [NOD-993] remove redundant Comment
* [NOD-993] Removed DeploymentError
* [NOD-982] Log message with level WARN when getting MsgReject.
* [NOD-982] Fix wrong logLevel in Write and Writef.
* [NOD-982] Use Write and Writef inside Trace, Tracef, Debug, Debugf, etc...
* [NOD-982] Move peer message logging to a separate file.
* [NOD-820] Add IsSynced to GetBlockTemplateResult.
* [NOD-820] Add isSynced to the help file.
* [NOD-820] Add MineWhenNotSynced to the kaspaminer config.
* [NOD-820] Implement miner MineWhenNotSynced logic.
* [NOD-820] Fixed capitalization in an error message.
* [NOD-847] Fix CIDR protection and prevent connecting to the same address twice
* [NOD-847] Fix Tests
* [NOD-847] Add TestDuplicateOutboundConnections and TestSameOutboundGroupConnections
* [NOD-847] Fix TestRetryPermanent, TestNetworkFailure and wait 10 ms before restoring the previous active config
* [NOD-847] Add "is" before boolean methods
* [NOD-847] Fix Connect's lock
* [NOD-847] Make numAddressesInAddressManager an argument
* [NOD-847] Add teardown function for address manager
* [NOD-847] Add stack trace to ConnManager errors
* [NOD-847] Change emptyAddressManagerForTest->createEmptyAddressManagerForTest and fix typos
* [NOD-847] Fix wrong test name for addressManagerForTest
* [NOD-847] Change error message if New fails
* [NOD-847] Add new line on releaseAddress
* [NOD-847] Always try to reconnect on disconnect
* [NOD-849] Cover ffldb/transaction with tests.
* [NOD-849] Cover cursor.go with tests.
* [NOD-849] Cover ldb/transaction with tests.
* [NOD-849] Cover location.go with tests.
* [NOD-849] Write TestFlatFileMultiFileRollback.
* [NOD-849] Fix merge errors.
* [NOD-849] Fix a comment.
* [NOD-849] Fix a comment.
* [NOD-849] Add a test that makes sure that files get deleted on rollback.
* [NOD-849] Add a test that makes sure that serializeLocation serialized to an expected value.
* [NOD-849] Improve TestFlatFileLocationDeserializationErrors.
* [NOD-849] Fix a copy+paste error.
* [NOD-849] Explain maxFileSize = 16.
* [NOD-849] Remove redundant RollbackUnlessClosed call.
* [NOD-849] Extract bucket to a variable in TestCursorSanity.
* [NOD-849] Rename TestKeyValueTransactionCommit to TestTransactionCommitForLevelDBMethods.
* [NOD-849] Extract prepareXXX into separate functions.
* [NOD-849] Simplify function calls in TestTransactionCloseErrors.
* [NOD-849] Extract validateCurrentCursorKeyAndValue to a separate function.
* [NOD-849] Add a comment over TestCursorSanity.
* [NOD-849] Add a comment over function in TestCursorCloseErrors.
* [NOD-849] Add a comment over function in TestTransactionCloseErrors.
* [NOD-849] Separate TestTransactionCloseErrors to TestTransactionCommitErrors and TestTransactionRollbackErrors.
* [NOD-849] Separate TestTransactionCloseErrors to TestTransactionCommitErrors and TestTransactionRollbackErrors.
* [NOD-849] Fix copy+paste error in comments.
* [NOD-849] Fix merge errors.
* [NOD-849] Merge TestTransactionCommitErrors and TestTransactionRollbackErrors into TestTransactionCloseErrors.
* [NOD-849] Move prepareDatabaseForTest into ffldb_test.go.
* [NOD-849] Add cursorKey to Value error messages in validateCurrentCursorKeyAndValue.
* [NOD-934] Fix addresses not getting their retry attempt counter incremented if they fail to connect.
* [NOD-922] Inline parseNetAddress.
* [NOD-922] Fix debug logs.
* [NOD-863] Write TestCursorNext.
* [NOD-863] Write TestCursorFirst.
* [NOD-863] Fix merge errors.
* [NOD-863] Add TestCursorSeek.
* [NOD-863] Add TestCursorCloseErrors.
* [NOD-863] Add TestCursorCloseFirstAndNext.
* [NOD-863] Add TestDataAccessorPut.
* [NOD-863] Add TestDataAccessorGet.
* [NOD-863] Add TestDataAccessorHas.
* [NOD-863] Add TestDatabaseDelete.
* [NOD-863] Add TestDatabaseAppendToStoreAndRetrieveFromStore.
* [NOD-863] Add TestTransactionAppendToStoreAndRetrieveFromStore.
* [NOD-863] Add TestTransactionDelete.
* [NOD-863] Add TestTransactionHas.
* [NOD-863] Add TestTransactionGet.
* [NOD-863] Add TestTransactionPut.
* [NOD-863] Move cursor tests to the bottom of interface_test.go.
* [NOD-863] Move interface_test.go to a database_test package.
* [NOD-863] Make each test in interface_test.go run for every database driver. Currently, only ffldb.
* [NOD-863] Make each cursor test in interface_test.go run for every database driver. Currently, only ffldb.
* [NOD-863] Split interface_test.go into separate files.
* [NOD-863] Rename interface_test.go to common_test.go.
* [NOD-863] Extract testForAllDatabaseTypes to a separate function.
* [NOD-863] Reorganize how test data gets added to the database.
* [NOD-863] Add explanations about testForAllDatabaseTypes.
* [NOD-863] Add tests that make sure that database changes don't affect previously opened transactions.
* [NOD-863] Extract databasePrepareFunc to a type alias.
* [NOD-863] Fix comments.
* [NOD-863] Add cursor exhaustion test to testCursorFirst.
* [NOD-863] Add cursor Next clause to testCursorSeek.
* [NOD-863] Add additional varification to testDatabasePut.
* [NOD-863] Add an additional verification into to testTransactionGet.
* [NOD-863] Add TestTransactionCommit.
* [NOD-863] Add TestTransactionRollback.
* [NOD-863] Add TestTransactionRollbackUnlessClosed.
* [NOD-863] Remove equals sign from databasePrepareFunc declaration.
* [NOD-858] Don't switch sync peer if the syncing process hasn't yet started with the current sync peer
* [NOD-858] SetShouldSendBlockLocator(false) on OnBlockLocator
* [NOD-858] Rename shouldSendBlockLocator->wasBlockLocatorRequested
* [NOD-858] Move panic to shouldReplaceSyncPeer
* [NOD-909] Add tests for double spends
* [NOD-909] Add prepareAndProcessBlock that gets parent hashes and transactions as argument
* [NOD-909] Use PrepareAndProcessBlockForTest where possible
* [NOD-909] Use more meaningful names
* [NOD-909] Change a comment
* [NOD-909] Fix comment
* [NOD-909] Fix comment
* [NOD-899] Inside the database, in case we're out of disk space, panic without printing the stack trace.
* [NOD-899] Fix bad variable name.
* [NOD-899] Reduce code duplication.
* [NOD-900] Fix Seek not working at expected.
* [NOD-900] Wrap error messages.
* [NOD-900] Use ldbIterator.Key instead of LevelDBCursor.Key.
* [NOD-900] Add a comment.