* [NOD-324] Properly handle GORM errors in API server
* [NOD-324] Handle RecordNotFound error in GetBlockByHashHandler
* [NOD-324] Make a separate function for NewErrorFromDBErrors
* [NOD-327] Add --migrate cli flag to API server
* [NOD-327] Change log messages
* [NOD-327] Remove `required` flag from API server RPC CLI arguments
* [NOD-327] Add database version in migrations logs
* [NOD-307] Implement API-Server GET /blocks
* [NOD-307] Implement API-Server GET /blocks
* [NOD-307] Add comments to exported constants
* [NOD-307] Flatten GET query values and check that 'order' value is valid
* [NOD-307] Validate order values in GetBlocksHandler
* [NOD-307] Add convertQueryParamToInt function
* [NOD-322] Make database.DB a function
* [NOD-322] Move context to be the first parameter in all functions
* [NOD-322] Set db to nil on database.Close()
* [NOD-322] Tidy go.mod/go.sum
* [NOD-322] Use http package const + message for StatusInternalServerError
* [NOD-299] Add waitgroup to wait for all `spawn`s to complete before calling teardown
* [NOD-299] Restore spawn on teardown + mark spawn done in the correct thread
* [NOD-303] Implement get transactions by address for API server
* [NOD-304] Implement get transactions by address
* [NOD-304] Implement get transactions by address
* [NOD-304] Use structs for where if possible
* [NOD-304] Auto increment IDs
* [NOD-304] Make defaultGetTransactionsLimit constant
* [NOD-304] Delete db directory
* [NOD-304] change db var to query
* [NOD-304] Extract route handle function from addRoutes
* [NOD-304] Order transactions by ID
* [NOD-304] Add error for passing arrays to GET
* [NOD-303] Implement get transaction by id for api server
* [NOD-303] Make routeParamTxID a constant
* [NOD-303] Change database is not current error.
* [NOD-303] Add ID to TransactionInput and TransactionOutput models
* [NOD-303] Change transactions_outputs table name to transaction_outputs and transactions_inputs to transaction_inputs
* [NOD-303] Add json annotations to transaction response types
* [NOD-303] Split server package
* [NOD-303] Add GetTransactionByHashHandler
* [NOD-303] Add comments to exported functions and variables
* [NOD-303] Put response types in a separate file
* [NOD-303] Rename functions
* [NOD-310] Implement REST server in API server
* [NOD-310] MetaData -> Metadata
* [NOD-310] Make custom context methods instead of custom request functions
* [NOD-310] change "Request ID" prefix to "RID" and convert to apiServerContext with newAPIServerContext everywhere
* [NOD-301] Don't sync with peer if the rendezvous point is below finality
* [NOD-301] Add block hash and peer address for the warn message
* [NOD-301] Fix perrLog.Warnf arguments order
* [NOD-300] If node has invalid ancestor set the according status in blockindex
* [NOD-300] Test that status is also updated for grand child of an invalid block
* [NOD-300] change make(blockSet) to newSet()
* [NOD-292] In accept.go, made dbStoreBlock and flushToDB occur within the same transaction.
* [NOD-292] Implemented processing blocks that were not validated on BTCD start.
* [NOD-292] Fixed processing logic on init. Added a test for it.
* [NOD-292] Fixed some comments.
* [NOD-292] Made unlocks deferred in a couple of places.
* [NOD-292] Made unprocessed block reprocess via ProcessBlock rather than maybeAcceptBlock.
* [NOD-292] Fixed grammar in comment. Added an explanation to TestAcceptingInInit.
* [NOD-292] Split flushToDB into two versions.
* [NOD-292] Fixed a bad assignment.
* [NOD-292] Fixed bad spacing.
* [NOD-297] Fix onChainChanged on rpcclient
* [NOD-285] create gorm models for db (#378)
* [NOD-285] Map API-Server database using GORM
* [NOD-285] Add accepting block to transactions and blocks models, and remove accepting block model
* [NOD-285] Define model relations
* [NOD-285] Fix many to many for Transaction and Block models
* [NOD-285] Remove redundant main file
* [NOD-296] Send SyncMgr.SubmitBlock errors as rpc errors (#381)
* [NOD-296] Send SyncMgr.SubmitBlock errors as rpc errors
* [NOD-296] Add error message prefix
* [NOD-298] Add comments to gorm models (#382)
* [NOD-294] Fix golint in deploy.sh and fix all lint warnings (#380)
* [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-295] Limit the length of GetData to 50 (#383)
* [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-297] Fix onChainChanged on rpcclient
* [NOD-286] Implement API-Server base structure (#379)
* [NOD-286] Implement API-Server base structure
* [NOD-286] Add rpc user and password as command line arguments
* [NOD-286] Make log directory a CLI argument
* [NOD-286] Add db login details as CLI arguments
* [NOD-297] Fix onChainChanged on rpcclient and server
* [NOD-297] Fix variables and functions names
* [NOD-297] Fix AcceptedTxIds -> AcceptedTxIDs
* [NOD-286] Implement API-Server base structure
* [NOD-286] Add rpc user and password as command line arguments
* [NOD-286] Make log directory a CLI argument
* [NOD-286] Add db login details as CLI arguments
* [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-285] Map API-Server database using GORM
* [NOD-285] Add accepting block to transactions and blocks models, and remove accepting block model
* [NOD-285] Define model relations
* [NOD-285] Fix many to many for Transaction and Block models
* [NOD-285] Remove redundant main file
* [NOD-280] Create database for API server
* [NOD-280] Rename public_key_script to pk_script
* [NOD-280] Change indexes names
* [NOD-280] Add accepting block to blocks and transactions table and remove accepting_blocks table
* [NOD-280] Add readme
* [NOD-280] Change VARCHAR(32) to CHAR(64)
* [NOD-280] Rename location_in_block to index
* [NOD-270] Added notifyChainChanges and related commands.
* [NOD-270] Added NTChainChanged to blockdag.
* [NOD-270] Implemented collection and sending of ChainChanged notifications.
* [NOD-270] Fixed an improperly named test.
* [NOD-270] Added a test: TestChainChangedNotification.
* [NOD-270] Fixed a couple copy+paste errors.
* [NOD-270] Added a couple of comments for TestChainChangedNotification.
* [NOD-270] Fixed formatting error.
* [NOD-270] Fixed a comment.
* [NOD-270] Uncoupled chain updates inside blockdag from the concept of a notification.
* [NOD-270] Removed intermediary ChainUpdates object from ChainChangedNotificationData.
* [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-264] Implemented calcTxSelectionValue.
* [NOD-264] Fixed bad subnetworkID in calcTxSelectionValue.
* [NOD-264] Implemented sorting the txDescs by value.
* [NOD-264] Got rid of txPrioItem.
* [NOD-264] Moved transaction selection to a separate file.
* [NOD-264] Renamed the result object to txsForBlockTemplate.
* [NOD-264] Implemented tx selection.
* [NOD-264] Fixed trying to get the gas limit for built-in subnetworks.
* [NOD-264] Wrote comments where appropriate.
* [NOD-264] Moved calcTxSelectionValue to the mining package. (Non-mining nodes shouldn't be forced to calc selection value for every transaction)
* [NOD-264] Wrote a test for selectTxs.
* [NOD-264] Fixed a comment.
* [NOD-264] Fixed misunderstood test.
* [NOD-264] Added zero fee check. Added a couple more tests.
* [NOD-264] Added probabilistic tests. Fixed a couple of bugs in tx selection.
* [NOD-264] Fixed tests with missing fees.
* [NOD-264] Added a test over a range of txs with different gas/mass.
* [NOD-264] Added expected probability to the rest of the test cases.
* [NOD-264] Tightened bounds in probability test.
* [NOD-264] Fixed values in probabily test.
* [NOD-264] Added a comments for alpha and rebalanceThreshold.
* [NOD-264] Fixed a couple of comments, renamed result to txsForBlockTemplate.
* [NOD-264] Removed an irrelevant comment. Changed Tracef to Warnf in some logs.
* [NOD-264] Renamed selectionValue -> txValue.
* [NOD-264] Moved rebalancing to the start of the tx selection loop.
* [NOD-264] Added overflow check for gasUsage.
* [NOD-264] Renamed blockSigOps and blockMass to totalSigOps and totalMass.
* [NOD-264] Removed the need to pass usedCount to reblanaceCandidates. Also relaxed bounds in a test.
* [NOD-264] Split selectTxs into smaller functions. Also relaxed bounds in a test some more.
* [NOD-264] Added a comment for findTx.
* [NOD-264] Ordered candidateTxs by subnetwork instead of txValue.
* [NOD-264] Disallowed zero tx fees in mempool and config. Renamed iterateCandidateTxs to populateTemplateFromCandidates.
* [NOD-264] Changed isFinalizedTransaction log level from Warn to Debug.
* [NOD-264] Removed references to SigOps in txSelection.
* [NOD-264] Removed SigOps validation. Validating mass should suffice.
* [NOD-264] Renamed wasUsed to isMarkedForDeletion.
* [NOD-264] Renamed markCandidateTxUsed to markCandidateTxForDeletion.
* [NOD-264] Made some probabilistic tests less likely to fail when they shouldn't.
* [NOD-264] Added a message warning people about probabilistic tests.
* [NOD-264] Rephrased a comment about rebalanceThreshold.
* [NOD-264] Removed IsCoinBase, CheckTransactionInputsAndCalulateFee, and ValidateTransactionScripts from txSelection.
* [NOD-264] Removed a condition that is no longer relevant.
* [NOD-264] "which's" -> "whose"
* [NOD-264] Removed wasteful preallocations.
* [NOD-264] Fixed a comment referring to "used" transactions.
* [NOD-269] Added a skeleton for getChainFromBlock.
* [NOD-269] Made startHash and includeBlocks optional.
* [NOD-269] Implemented chainBlock collection.
* [NOD-269] Extracted GetBlockVerboseResult building to its own method.
* [NOD-269] Implemented the IncludeBlocks part of GetChainFromBlock.
* [NOD-269] Added a comment for NewGetChainFromBlockCmd.
* [NOD-269] Made IsInSelectedPathChain return an error.
* [NOD-269] Fixed a very wrong comment.
* [NOD-269] Made SelectedPathChain allocate only the required amount of space.
* [NOD-269] Renamed pathChain to parentChain.
* [NOD-269] Split handleGetChainFromBlock to separate functions.
* [NOD-269] Fixed some grammar.
* [NOD-234] Added an IsCurrent check to handleGetBlockTemplate.
* [NOD-234] Removed IsCurrent check from handleGetBlockTemplateRequest. Added an explanation for why we're checking the chainHeight.
* [NOD-234] Added ShouldMineOnGenesis to the IsCurrent check.
* [NOD-234] Flipped && operands to fail fast.
* [NOD-240] Removed references to the wallet in rpcserver.go.
* [NOD-240] Began removing btcwalletxxx.go.
* [NOD-240] Got rid of rpcclient/wallet.go and walletsvrcmds.go.
* [NOD-240] Moved GetBestBlockResult to dagsvrresults.go.
* [NOD-240] Finished removing walletsvrXXX.go.
* [NOD-240] Removed wallet stuff from btcctl.
* [NOD-240] Removed a few last things that I've missed.