* [NOD-806] After panic, gracefully stop logs, and then exit immediately
* [NOD-806] Convert non-kaspad applications to use the new spawn
* [NOD-806] Fix disabled log at rpcclient
* [NOD-806] Refactor HandlePanic
* [NOD-806] Cancel Logger interface
* [NOD-806] Remove redundant spawn checks from waitgroup_test.go
* [NOD-806] Use caller subsystem when logging panics
* [NOD-806] Fix go vet errors
* [NOD-719] Added defers to unlocks (#618)
* [NOD-719] Added defers to unlocks
* [NOD-719] Added another defer to another Unlock
* [NOD-719] Added yet another defer to yet another Unlock
* [NOD-747] Change FinalityInterval to be 24 hours, isCurrent to be true if the DAG's time is less than 12 hours than the present, and change MaxInvPerMsg to be 1 << 17 (#625)
* [NOD-641] Upgrade to github.com/pkg/errors v0.9.1 and use errors.As where needed
* [NOD-641] Fix find and replace error
* [NOD-641] Use errors.As for error type checking
* [NOD-641] Fix errors.As for pointer types
* [NOD-641] Use errors.As where needed
* [NOD-641] Rename rErr->ruleErr
* [NOD-641] Rename derr->dbErr
* [NOD-641] e->flagsErr where necessary
* [NOD-641] change jerr to more appropriate name
* [NOD-641] Rename cerr->bdRuleErr
* [NOD-641] Rename serr->scriptErr
* [NOD-641] Use errors.Is instead of testutil.AreErrorsEqual in TestNewHashFromStr
* [NOD-641] Rename bdRuleErr->dagRuleErr
* [NOD-641] Rename mErr->msgErr
* [NOD-641] Rename dErr->deserializeErr
* [NOD-648] Add TestProcessDelayedBlocks
* [NOD-648] Add one second to secondsUntilDelayedBlockIsValid to make sure the delayedBlock timestamp will be valid, and add comments
* [NOD-648] Remove redundant import
* [NOD-648] Use fakeTimeSource instead of time.Sleep
* [NOD-648] Rename dag.HaveBlock->dag.IsKnownBlock, dag.BlockExists->dag.IsInDAG
* [NOD-648] Add comment
* [NOD-641] Rename HaveBlock->IsKnownBlock, BlockExists->IsInDAG
* [NOD-652] Add selectedTip and getSelectedTip messages
* [NOD-652] Remove peerSyncState.isSelectedTipKnown
* [NOD-652] Do nothing on OnSelectedTip if the peer selected tip hasn't changed
* [NOD-652] Handle selected tip message with block handler
* [NOD-652] Add comments
* [NOD-652] go mod tidy
* [NOD-652] Fix TestVersion
* [NOD-652] Use dag.AdjustedTime instead of dag.timeSource.AdjustedTime
* [NOD-652] Create shouldQueryPeerSelectedTips and queueMsgGetSelectedTip functions
* [NOD-652] Change selectedTip to selectedTipHash where needed
* [NOD-652] add minDAGTimeDelay constant
* [NOD-652] add comments
* [NOD-652] Fix names and comments
* [NOD-652] Put msg.reply push in the right place
* [NOD-652] Fix comments and names
* [NOD-669] Remove the "get" from getBlueBlocksBetween.
* [NOD-669] Remove the "Get" from GetBlueBlocksHeadersBetween.
* [NOD-669] In blueBlocksBetween, rename startHash to lowHash and stopHash to highHash.
* [NOD-669] Rename startHash to lowHash and stopHash to highHash in blockLocator logic.
* [NOD-669] Remove zeroHash logic in blockLocator.
* [NOD-669] Finish renaming startHash and stopHash in blockdag.
* [NOD-669] Rename startHash and stopHash in blockdag where I previously missed it.
* [NOD-669] Rename startHash and stopHash in blockdag where I previously missed it some more.
* [NOD-669] Rename startHash and stopHash in blockdag where I previously missed it some more some more.
* [NOD-669] Fix bad grammar in method names.
* [NOD-669] Rename lowHash to blockHash in SelectedParentChain.
* [NOD-669] Fix a comment.
* [NOD-669] Fix startSync sending a blockLocatorMsg with a zeroHash instead of the peer's selectedTip.
* [NOD-669] Rename bestPeer to syncPeer.
* [NOD-669] Fix comments.
* [NOD-420] Delay blocks with valid timestamp (non-delayed) that point to a delayed block.
* [NOD-420] Mark block as requested when setting as delayed.
* [NOD-420] Merge master; Use dag.timeSource.AdjustedTime() instead of time.Now;
* [NOD-420] Return nil when not expecting an error
* [NOD-420] Initialise delyaed blocks mapping
* [NOD-420] Trigger delayed blocks processing every time we process a block.
* [NOD-420] Hold the read lock in processDelayedBlocks
* [NOD-420] Add delayed blocks heap sorted by their process time so we could process them in order.
* [NOD-420] Update debug log
* [NOD-420] Fix process blocks loop
* [NOD-420] Add comment
* [NOD-420] Log error message
* [NOD-420] Implement peek method for delayed block heap. extract delayed block processing to another function.
* [NOD-420] Trigger process delayed blocks only in process block
* [NOD-420] Move delayed block addition to process block
* [NOD-420] Use process block to make sure we fully process the delayed block and deal with orphans.
* [NOD-420] Unexport functions when not needed; Return isDelayed boolean from ProcessBlock instead of the delay duration
* [NOd-420] Remove redundant delayedBlocksLock
* [NOD-420] Resolve merge conflict; Return delay 0 instead of boolean
* [NOD-420] Do not treat delayed block as orphan
* [NOD-420] Make sure block is not processed if we have already sa delayed.
* [NOD-420] Process delayed block if parent is delayed to make sure it would not be treated as orphan.
* [NOD-420] Rename variable
* [NOD-420] Rename function. Move maxDelayOfParents to process.go
* [NOD-420] Fix typo
* [NOD-420] Handle errors from processDelayedBlocks properly
* [NOD-420] Return default values if err != nil from dag.addDelayedBlock
* [NOD-420] Return default values if err != nil from dag.addDelayedBlock in another place
Co-authored-by: Svarog <feanorr@gmail.com>
* [NOD-517] Remove copyright notices from all doc.go.
* [NOD-517] Updated the root doc.go.
* [NOD-517] Remove all cov_report.sh and test_coverage.txt.
* [NOD-517] Make all doc.go use the same style of comment.
* [NOD-517] Update dagconfig doc.go.
* [NOD-517] Update blockdag doc.go.
* [NOD-517] Update doc.go in connmgr.
* [NOD-517] Update doc.go in fullblocktests.
* [NOD-517] Update doc.go in database.
* [NOD-517] Update doc.go in ecc.
* [NOD-517] Update doc.go in rpctest.
* [NOD-517] Removed superfluous license in logs.
* [NOD-517] Update doc.go in mempool.
* [NOD-517] Updated doc.go in peer.
* [NOD-517] Update doc.go in rpcclient.
* [NOD-517] Update doc.go in txscript.
* [NOD-517] Update doc.go in util.
* [NOD-517] Update doc.go in base58.
* [NOD-517] Update doc.go in bech32.
* [NOD-517] Update doc.go in txsort.
* [NOD-517] Update doc.go in wire.
* [NOD-517] Fix indentation.
* [NOD-517] Add a copyright notice to the main doc.go.
* [NOD-517] Add Conformal to the license notices.
* [NOD-517] Remove superfluous language from a doc.
* [NOD-517] Fix bad example.
* [NOD-532] Change chain to DAG in the root package.
* [NOD-532] Change chain to DAG in checkpoints.go.
* [NOD-532] Change chain to DAG in blockdag.
* [NOD-532] Change chain to DAG in cmd.
* [NOD-532] Change chain to DAG in dagconfig.
* [NOD-532] Change chain to DAG in database.
* [NOD-532] Change chain to DAG in mempool.
* [NOD-532] Change chain to DAG in mempool.
* [NOD-532] Change chain to DAG in netsync.
* [NOD-532] Change chain to DAG in rpcclient.
* [NOD-532] Change chain to DAG in server.
* [NOD-532] Change chain to DAG in txscript.
* [NOD-532] Change chain to DAG in util.
* [NOD-532] Change chain to DAG in wire.
* [NOD-532] Remove block heights in dagio.go examples.
* [NOD-532] Rename fakeChain to fakeDAG.
* [NOD-532] Fix comments, remove unused EnableBCInfoHacks flag.
* [NOD-532] Fix comments and variable names.
* [NOD-532] Fix comments.
* [NOD-532] Fix merge errors.
* [NOD-532] Formatted project.
* [NOD-494] Updated main README.md
* [NOD-494] Updated blockdag/README.md
* [NOD-494] Aligned text length in main README.md
* [NOD-494] Updated most remaining packages READMEs + deleted util/coinset
* [NOD-494] Update integration README
* [NOD-494] Did a final pass over all readmes
* [NOD-494] Updated README for DNSSeeder with more info on how to create a functioning setup
* [NOD-494] Remove all double spaces from readmes
* [NOD-494] Minor fixes in READMEs + update license to kaspanet developers
* [NOD-494] Add backtick around ecc and util in hdkeychain README
* [NOD-502] Remove checkpoints.
* [NOD-502] Remove remaining references to checkpoints.
* [NOD-500] Split RejectFinality to RejectDifficulty.
* [NOD-500] Remove support for headers-first in p2p.
* [NOD-500] Panic in newHashFromStr in case of an error.
* [NOD-487] Implement a mechanism to gracefully shut down after a panic.
* [NOD-487] Fixed bad log.
* [NOD-487] Removed unused import.
* [NOD-487] Convert panic handlers from anonymous functions to methods.
* [NOD-488] Make getBlueBlocksBetween return error if start hash is not in the selected parent chain of stop hash
* [NOD-488] Convert for to while style
* [NOD-295] Fixed bad break condition in addInvsToGetDataMessageFromQueue.
* [NOD-295] Fixed the fix for bad break condition in addInvsToGetDataMessageFromQueue.
* [NOD-295] Made the check for max invs refer to invsNum instead of MaxInvPerGetDataMsg.
* [NOD-294] Fix golint in deploy.sh and fixed all lint errors
* [NOD-294] Fix typos in comments
* [NOD-294] Convert VirtualForTest into alias of *virtualBlock
* [NOD-294] Fixed some more typos in comments
* [NOD-256] Add error log
* [NOD-256] Add error log
* [NOD-256] Fix typo and comment
* [NOD-256] Remove btclog dir
* [NOD-256] Format project
* [NOD-256] Add error log files
* [NOD-256] Add an option to add a log file to write into to an existing backend logger
* [NOD-256] Get rid of redundant logs initialization
* [NOD-256] rename initLogRotators to initLog
* [NOD-256] Get rid ExampleSignTxOutput and convert ExampleBlockDAG_ProcessBlock to a regular test
* [NOD-256] Show error message if os.Exiting from initLog
* [NOD-241] Implement lower resolution peer rendezvous point discovery
* [NOD-241] Implement lower resolution peer rendezvous point discovery
* [NOD-241] Find exact rendezvous point
* [NOD-241] Find exact rendezvous point
* [NOD-241] Fix tests
* [NOD-241] Remove hash stop from MsgBlockLocator and add tests to MsgBlockLocator and MsgGetBlockLocator
* [NOD-241] Change everywhere startHash to hashStart and change comments
* [NOD-241] Fix locateBlockNodes to stop at hashStop
* [NOD-241] Formatted locatorSummary.
* [NOD-241] Fix node reversal
* [NOD-241] Fix hash start and hash stop order, and don't include startNode in dag.blockLocator
* [NOD-241] rename locateBlockNodes -> getBlueBlocksBetween and add a comment to it
* [NOD-241] change hash start to start hash and hash stop to stop hash
* [NOD-241] Move block locator stuff to a different file
* [NOD-241] Rename msggetblocks.go to msggetblockinvs.go
* [NOD-241] Format project
* [NOD-241] Rename rpcserverSyncManager.LocateHeaders to GetBlueBlocksHeadersBetween
* [NOD-241] Move the logic of finding the highest shared block to OnBlockLocator
* [NOD-241] Rename chainHeight -> nextChainHeight
* [NOD-241] Fix typo in comment
* [NOD-255] When orphan blocks arrive from netsync - don't write log unless we are in Debug
* [NOD-255] If there are more than K*2 orphans in pool - report as a potential problem anyway
* [NOD-255] Update comment to explain the K*2 figure
* [NOD-208] Added blockBlueScore to UTXOEntry.
* [NOD-208] Added blueBlockScore to NewUTXOEntry.
* [NOD-208] Fixed compilation errors in policy, utxoset, and dag tests.
* [NOD-208] Changed validateBlockRewardMaturity and CheckTransactionInputsAndCalulateFee to use blueScore.
* [NOD-208] Changed CalcBlockSubsidy to use blueScore.
* [NOD-208] Changed SequenceLockActive to use blueScore.
* [NOD-208] Removed ExtractCoinbaseHeight.
* [NOD-208] Removed reference to block height in ensureNoDuplicateTx.
* [NOD-208] Changed IsFinalizedTransaction to use blueScore.
* [NOD-208] Fixed merge errors.
* [NOD-208] Made UTXOEntry serialization use blueScore.
* [NOD-208] Changed CalcPriority and calcInputValueAge to use blueScore.
* [NOD-208] Changed calcSequenceLock to use blueScore.
* [NOD-208] Removed blockChainHeight from UTXOEntry.
* [NOD-208] Fixed compilation errors in feeEstimator. Fixed a bug in the test pool hardness.
* [NOD-208] Fixed oldestChainBlockWithBlueScoreGreaterThan not handling an extreme case.
* [NOD-208] Fixed TestDiffFromTx.
* [NOD-208] Got rid of priority and support of free transactions.
* [NOD-208] Fixed TestProcessTransaction.
* [NOD-208] Fixed TestTxFeePrioHeap.
* [NOD-208] Fixed TestAddrIndex and TestFeeEstimatorCfg.
* [NOD-208] Removed unused rateLimit parameter from ProcessTransaction.
* [NOD-208] Fixed tests that rely on CreateTxChain.
* [NOD-208] Fixed tests that rely on CreateSignedTxForSubnetwork.
* [NOD-208] Fixed TestFetchTransaction.
* [NOD-208] Fixed TestHandleNewBlock. Fixed HandleNewBlock erroneously processing fee transactions.
* [NOD-208] Fixed TestTxIndexConnectBlock.
* [NOD-208] Removed the use of Height() from the fee estimator.
* [NOD-208] Removed unused methods from rpcwebsocket.go.
* [NOD-208] Removed Height from util.Block.
* [NOD-208] Removed ErrForkTooOld. It doesn't make sense in a DAG.
* [NOD-208] Made blockHeap use blueScore instead of height.
* [NOD-208] Removed fee estimator.
* [NOD-208] Removed DAG.Height.
* [NOD-208] Made TestAncestorErrors test chainHeight instead of height.
* [NOD-208] Fixed a couple of comments that were still speaking about block height.
* [NOD-208] Replaced all uses of HighestTipHash with SelectedTipHash.
* [NOD-208] Remove blockNode highest and some remaining erroneous uses of height.
* [NOD-208] Fixed a couple of comments. Fixed outPoint -> outpoint merge error.
* [NOD-208] Fixed a couple more comments.
* [NOD-208] Used calcMinRequiredTxRelayFee instead of DefaultMinRelayTxFee for mempool tests.
* [NOD-208] Renamed mempool Config BestHeight to DAGChainHeight.
* [NOD-208] Fixed a bug in oldestChainBlockWithBlueScoreGreaterThan. Made calcSequenceLock use the node's selected parent chain rather than the virtual block's.
* [NOD-208] Removed chainHeight from blockNode String().
Renamed checkpointsByHeight to checkpointsByChainHeight and prevCheckpointHeight to prevCheckpointChainHeight.
Removed reference to chainHeight in blockIndexKey.
Fixed comments in dagio.go.
* [NOD-208] Removed indexers/blocklogger.go, as no one was using it.
* [NOD-208] Made blocklogger.go log blueScore instead of height.
* [NOD-208] Fixed typo.
* [NOD-208] Fixed comments, did minor renaming.
* [NOD-208] Made a "common sense" wrapper around sort.Search.
* [NOD-208] Fixed comment in SearchSlice.
* [NOD-175] Added BlockAddedNotificationData and sent it instead of just a block on BlockAdded.
* [NOD-175] Added BFWasUnorphaned and raised it when an unorphaned block was to be accepted.
* [NOD-175] Fixed a typo.
* [NOD-175] Made it so that only the mempool gets updated if we're not current or the block was just now unorphaned.
* [NOD-152] Stopped pushBlockMsg from sending tip inv to syncing nodes.
* [NOD-152] Fixed restartSyncIfNeeded not restarting if sync is needed.
* [NOD-152] Removed continueHash, as it is no longer required.
* [NOD-142] Updated util.FastLog2Floor to work on uint64
* [NOD-142] Convert height and chainHeight to uint64
* [NOD-142] A couple fixes in comments of TestFastLog2Floor
* [NOD-142] Make spendableOutOffset uint64 too