* [NOD-1223] Move all network stuff into a new network package.
* [NOD-1223] Delete the unused package testutil.
* [NOD-1223] Move infrastructure stuff into a new instrastructure package.
* [NOD-1223] Move domain stuff into a new domain package.
* [NOD-1162] Separate kaspad to it's own package, so that I can use it out of integration test
* [NOD-1162] Begin integration tests
* [NOD-1162] [FIX] Assign cfg to RPCServer
* [NOD-1162] Basic integration test ready
* [NOD-1162] Wait for connection for real
* [NOD-1162] [FIX] Connection manager should run the moment it adds a request
* [NOD-1162] Make connect something that can be invoked in middle of test
* [NOD-1162] Complete first integration test
* [NOD-1162] Undo refactor error
* [NOD-1162] Rename Kaspad to App
* [NOD-1162] Convert checking connection to polling
* [NOD-1162] [FIX] Set peerID on handshake
* [NOD-1162] [FIX] Broadcast should send to outgoing route, not incoming
* [NOD-1162] [FIX] Add CmdInvRelayBlock to MakeEmptyMessage
* [NOD-1162] [FIX] Initialize Hash before decoding MsgInvRelayBlock
* [NOD-1162] [FIX] Invert condition
* [NOD-1162] [FIX] Fixes to encoding of MsgGetRelayBlocks
* [NOD-1162] [FIX] Add MsgGetRelayBlocks to MakeEmptyMessage
* [NOD-1162] [FIX] Connection manager should run the moment it adds a request
* [NOD-1162] [FIX] Set peerID on handshake
* [NOD-1162] [FIX] Broadcast should send to outgoing route, not incoming
* [NOD-1162] [FIX] Add CmdInvRelayBlock to MakeEmptyMessage
* [NOD-1162] [FIX] Initialize Hash before decoding MsgInvRelayBlock
* [NOD-1162] [FIX] Invert condition
* [NOD-1162] [FIX] Fixes to encoding of MsgGetRelayBlocks
* [NOD-1162] [FIX] Add MsgGetRelayBlocks to MakeEmptyMessage
* [NOD-1162] Add comment
* [NOD-1162] Added support for 3 nodes and clients in integration tests
* [NOD-1162] Add third node to integration test
* [NOD-1192] Use lock-less functions in TxPool.HandleNewBlock
* [NOD-1192] Broadcast transactions only if there's more then 0
* [NOD-1162] Removed double waitTillNextIteration
* [NOD-1192] Rename: broadcastTransactions -> broadcastTransactionsAfterBlockAdded
* [NOD-1162] Call NotifyBlocks on client3 as well
* [NOD-1162] ErrTimeout and ErrRouteClosed should be ProtocolErrors
* [NOD-1162] Added comment and removed redundant type PeerAddedCallback
* [NOD-1162] Revert overly eager rename
* [NOD-1162] Move DisalbeTLS to common config + minimize call for ioutil.TempDir()
* [NOD-1162] Add some clarifications in code
* [NOD-1193] Skip closed connections in NetAdapter.Broadcast
* [NOD-1193] Make sure to protect connectionsToRouters from concurrent access
* [NOD-1162] Add _test to all files in integration package
* [NOD-1162] Introduced appHarness to better encapsulate a single node
* [NOD-1162] Removed onChainChanged handler
* [NOD-1162] Remove redundant closure
* [NOD-1162] Correctly mark integration_test config as Simnet
* [NOD-1162] Rename app.ID -> app.P2PNodeID
* [NOD-1119] Removed all p2p server from all the initialization of server
* [NOD-1119] Removed any calling for p2p server in main
* [NOD-1119] Simplified some functions to not take both dag and dagParams
* [NOD-1119] Simplify creation of mempool and rpc server
* [NOD-1119] Setup indexes in separate function
* [NOD-1119] Some cleanup in NewServer
* [NOD-1119] Fix mempool test
* [NOD-1119] Fix go format
* [NOD-1119] Unexport dag.timeSource
* [NOD-1119] Removed server package + renamed the Server object to Kaspad, and made it minimal
* [NOD-1119] Delete redundant functions
* Unexported kaspad and related methods
* [NOD-1119] Unexported newKaspad
* [NOD-1119] Revise comments and remove redundant function
* [NOD-1119] Make comments of unexported methods lower-case
* [NOD-1119] Some more refactoring in newKaspad
* [DEV-376] Changed any instance of %v in format strings with a more specific format token
* [DEV-376] Fixed some more wrong formatting strings + removed redundant
cast
* [DEV-376] Added fmt.Sprintf where it was missing
* [DEV-376] use %s for util.Amount, to invoke .String()
* [DEV-376] Some more fixes in format strings
* [DEV-376] fixed mruinvmap_test to expect the correct behaviour
* [DEV-134] Implement Continuous Integration
Squashed commit:
[5e41d830] Dev 223 fix txindex (#100)
* [DEV-201] In handleGetBlockDAGInfo calculate difficulty by the tip with the lowest bits
* [DEV-202] Move VirtualBlock.GetUTXOEntry to BlockDAG
* [DEV-203] Move VirtualBlock.SelectedTip() to BlockDAG
* [DEV-203] Move VirtualBlock.SelectedTip() to BlockDAG
* [DEV-204] Unexport VirtualBlock() and add CalcMedianTime method for DAG
* [DEV-204] add explanation about difficulty in CurrentBits() comment
* [DEV-204] unexport VirtualBlock type
* [DEV-223] make applyUTXOChanges return pastUTXOResults
* [DEV-223] add bluestxdata for current block as well
* [DEV-223] re-design tx index
* [DEV-223] edit txindex comments
* [DEV-223] rename BluesTxData -> AcceptedTxData, and return from applyUTXOChanges only transactions that got accepted
* [DEV-223] add unit test for txindex
* [DEV-223] fix comments and unite blueTransaction and AcceptedTxData to one type
* [DEV-223] use bucket cursor for dbFetchFirstTxRegion
* [DEV-223] use the same cursor instance for dbFetchFirstTxRegion
* [DEV-223] write in dbFetchFirstTxRegion's comment that it returns the first block region
* [DEV-223] rename type BlueBlockTransaction to TxWithBlockHash
* [DEV-223] add named returned value for applyUTXOChanges
[4c95e293] [DEV-134] Made golint ignore the vendor directory.
[21736dbc] [DEV-134] Renamed ExampleBlockChain_ProcessBlock to ExampleBlockDAG_ProcessBlock to satisfy go vet.
[beea6486] [DEV-134] Removed pushing the built docker to a remove repository. That's unnecessary at this stage.
[bee911ed] [DEV-134] Made all precompilation checks run on everything instead of only the root dir.
[585f92ae] [DEV-134] Added "github.com/pkg/errors" to dep.
[5f02f570] [DEV-134] -vendor-only is written with only one hyphen.
[3eee7f95] [DEV-134] go vet instead of go tool vet.
[0c2d4343] [DEV-134] Split all the pre-compile checks to separate lines to be able to tell which of them is failing.
[780519c8] [DEV-134] Ran gofmt on everything.
[8247146b] Dev 223 fix txindex (#100)
* [DEV-201] In handleGetBlockDAGInfo calculate difficulty by the tip with the lowest bits
* [DEV-202] Move VirtualBlock.GetUTXOEntry to BlockDAG
* [DEV-203] Move VirtualBlock.SelectedTip() to BlockDAG
* [DEV-203] Move VirtualBlock.SelectedTip() to BlockDAG
* [DEV-204] Unexport VirtualBlock() and add CalcMedianTime method for DAG
* [DEV-204] add explanation about difficulty in CurrentBits() comment
* [DEV-204] unexport VirtualBlock type
* [DEV-223] make applyUTXOChanges return pastUTXOResults
* [DEV-223] add bluestxdata for current block as well
* [DEV-223] re-design tx index
* [DEV-223] edit txindex comments
* [DEV-223] rename BluesTxData -> AcceptedTxData, and return from applyUTXOChanges only transactions that got accepted
* [DEV-223] add unit test for txindex
* [DEV-223] fix comments and unite blueTransaction and AcceptedTxData to one type
* [DEV-223] use bucket cursor for dbFetchFirstTxRegion
* [DEV-223] use the same cursor instance for dbFetchFirstTxRegion
* [DEV-223] write in dbFetchFirstTxRegion's comment that it returns the first block region
* [DEV-223] rename type BlueBlockTransaction to TxWithBlockHash
* [DEV-223] add named returned value for applyUTXOChanges
[bff68aa3] [DEV-134] Gave executable permission to deploy.sh
[638a99d9] [DEV-134] Added jenkinsfile and deploy script.
* [DEV-134] Added a robust testing script.
* [DEV-134] Fixed a bash-ism.
* [DEV-134] Disabled testing with coverage for now.
* [DEV-134] Disabled golint and removed removing debug symbols.
* [DEV-134] Disabled aligncheck.
* [DEV-134] Disabled structcheck and varcheck.
* [DEV-134] Added "don't inline functions" to compiler flags for testing.
* [DEV-134] Made build fail if gofmt prints out anything.
* [DEV-134] Fixed misleading comment.
* [DEV-134] Added comments to test.sh.
* [DEV-134] Renamed tm to measure_runtime and removed do_ prefixes from functions.
* [DEV-134] Fixed gofmt line in build script.
* [DEV-134] Fixed gofmt some more.
* [DEV-134] Fixed gofmt not actually failing due to logical or.
* [DEV-82] break down main to packages
* [DEV-82] separate rpcserver and server
* [DEV-82] Fixed Windows-related code that failed to compile.
* [DEV-82] remove params.go and use only dagconfig.Params
* [DEV-82] fix log.go license
This rewrites the shutdown logic to simplify the shutdown signalling.
All cleanup is now run from deferred functions in the main function and
channels are used to signal shutdown either from OS signals or from
other subsystems such as the RPC server and windows service controller.
The RPC server has been modified to use a new channel for signalling
shutdown that is exposed via the RequestedProcessShutdown function
instead of directly calling Stop on the server as it previously did.
Finally, it adds a few checks for early termination during the main
start sequence so the process can be stopped without starting all the
subsystems if desired.
This is a backport of the equivalent logic from Decred with a few slight
modifications. Credits go to @jrick.
This commit modifies btcd to run cleanly as a Windows service. btcd is
intended to be a long running process that stays synchronized with the
bitcoin block chain and provides chain services to multiple users. It
follows that a service is the best option on Windows for this
functionality.
A few key points are:
- Supports graceful shutdown via the service stop/shutdown commands
- Integrates cleanly with the Windows event log
- Adds a new /s flag that can be used to install/remove/start/stop the
service
One outstanding issue is that the application data directory is currently
user specific which means, by default, if you start btcd as a user, the
same data won't be used as when it's running as a service. This needs to
be resovled. The most likely approach will be to put all data into the
common appdata directory Windows provides, but it will require some
additional work to deal with permissions properly as user processes can't
write there by default.
Closes#42.