Commit graph

26 commits

Author SHA1 Message Date
Olaoluwa Osuntokun
ecdffda748 Add support for an optional address-based transaction index.
* Address index is built up concurrently with the `--addrindex` flag.
* Entire index can be deleted with `--dropaddrindex`.
* New RPC call: `searchrawtransaction`
  * Returns all transacitons related to a particular address
  * Includes mempool transactions
  * Requires `--addrindex` to be activated and fully caught up.
* New `blockLogger` struct has been added to factor our common logging
  code
* Wiki and docs updated with new features.
2015-02-05 14:48:19 -08:00
Dave Collins
03433dad6a Update btcwire path import paths to new location. 2015-02-05 15:16:39 -06:00
Dave Collins
624bbb3216 Update btcchain import paths to new location. 2015-01-30 16:25:42 -06:00
Dave Collins
3b1a15d0d5 Update btcscript import paths to new location. 2015-01-30 12:14:33 -06:00
Dave Collins
309a9ea31d Update database import paths to new location. 2015-01-27 15:38:23 -06:00
Dave Collins
f9f4d37976 Update btcd import paths to new location. 2015-01-17 00:48:13 -06:00
Dave Collins
a57505b7f0 Update btcscript import paths to new location. 2015-01-16 19:37:00 -06:00
Dave Collins
528622b259 Update btcchain import paths to new location. 2015-01-16 18:47:50 -06:00
Dave Collins
0b7a9074ef Update btcdb import paths to new location. 2015-01-16 18:30:32 -06:00
Dave Collins
54ccb83025 Update btcwire import paths to new location. 2015-01-16 15:13:21 -06:00
Dave Collins
0e8c3b743d Update btclog import paths to new location. 2015-01-16 11:42:25 -06:00
Dave Collins
fc6a10c563 Update seelog import paths to new location. 2015-01-15 22:25:41 -06:00
Josh Rickmar
c257da934e Improve double spend error strings.
The mempool's MaybeAcceptTransaction methods have also been modified
to return a slice of transaction hashes referenced by the transaction
inputs which are unknown (totally spent or never seen).  While this is
currently used to include the first hash in a ProcessTransaction error
message if inserting orphans is not allowed, it may also be used in
the future to request orphan transactions from peers.
2015-01-08 23:54:11 -05:00
Olaoluwa Osuntokun
b97083f882 Fix some typos throughout repo. 2014-09-08 14:54:52 -05:00
Dave Collins
000691dc9e Implement BIP0061 reject handling (pver 70002).
This commit implements reject handling as defined by BIP0061 and bumps the
maximum supported protocol version to 70002 accordingly.

As a part of supporting this a new error type named RuleError has been
introduced which encapsulates and underlying error which could be one of
the existing TxRuleError or btcchain.RuleError types.

This allows a single high level type assertion to be used to determine if
the block or transaction was rejected due to a rule error or due to an
unexpected error.  Meanwhile, an appropriate reject error can be created
from the error by pulling the underlying error out and using it.

Also, a check for minimum protocol version of 209 has been added.

Closes #133.
2014-07-14 12:25:11 -05:00
Dave Collins
62f21d3600 Move address manager to its own package.
This commit does just enough to move the address manager into its own
package.  Since it was not originally written as a package, it will
require a bit of refactoring and cleanup to turn it into a robust
package with a friendly API.
2014-07-06 01:06:38 -05:00
Tomás Senart
84fa553b65 Split imports into logical groups 2014-07-02 15:56:41 +02:00
Dave Collins
5e517a9116 Add new logging subsystem for mining related ops.
This commit adds a new logging subsystem named MINR which is used for
logging mining releated operations.
2014-03-22 11:47:02 -05:00
Dave Collins
d2bfd3d98b Alphabetize subsystem loggers.
This commit simply alphabetizes the subsystem logger variables, map, and
use switch so the order in the code is consistent with the sorted output
displayed when using --debuglevel.
2014-03-01 16:08:21 -06:00
Dave Collins
f9922c7305 Add --logdir option to specify logging directory.
This commit adds a new option, --logdir, which works in the same fashion
as the --datadir option.  Consequently, the logging directory is name
"namespaced" by the network as well.  This resolves the issue where two
btcd instances running (one for mainnet and one for testnet) would
overwrite each other's log files by default.

It also provides the user with a method to change the logging location to
non-default locations if they prefer.  For example, it enables multiple
btcd instances on the same network to specify unique logging directories
(even though running multiple btcd instances on the same network is not
the most sane configuration).

Closes #95.
2014-02-12 15:56:05 -06:00
Dave Collins
33bb455365 Update for recent btcwire API changes. 2014-01-18 21:15:09 -06:00
Dave Collins
aeec39c1ff Add 2014 to copyright dates. 2014-01-01 10:16:15 -06:00
Dave Collins
766aae5a72 Add rolling log file.
This commit modifies the logging to also log all output to a rolling log
file in the btcd home directory under the logs folder.  It uses a maximum
size of 10MB per log file and a max rotation size of 3.  This means the
log files will not exceed 30 megabytes.
2013-11-25 13:40:53 -06:00
Dave Collins
eb8688df79 Convert btcd to use new btclog package.
Also, make every subsystem within btcd use its own logger instance so each
subsystem can have its own level specified independent of the others.

This is work towards #48.
2013-11-21 17:41:21 -06:00
Dave Collins
9772626dd8 Improve logging.
This commit is a first pass at improving the logging.  It changes a number
of things to improve the readability of the output.  The biggest addition
is message summaries for each message type when using the debug logging
level.

There is sitll more to do here such as allowing the level of each
subsystem to be independently specified, syslog support, and allowing the
logging level to be changed run-time.
2013-10-10 17:22:19 -05:00
Dave Collins
54b5cb56e7 Move logger code into its own file.
This cleans up btcd.go a bit and consolidates the logging related
functions.  It also paves the way for upcoming message summaries.
2013-10-10 14:36:05 -05:00