Commit graph

3400 commits

Author SHA1 Message Date
Dave Collins
8e3ede441b Update for recent go-flags API changes. 2013-11-24 12:33:36 -06:00
Josh Rickmar
6f2b96b7e2 Fix help message for listtransactions. 2013-11-22 15:18:23 -05:00
Josh Rickmar
d00ca48475 Print listtransactions replies with go-spew. 2013-11-22 14:20:31 -05:00
Owain G. Ainsworth
f843c141ae in Valid() ensure that na.IP is set. Found by drahn. 2013-11-22 18:48:36 +00:00
Dave Collins
a9bf28af4d Allow the overall log level to be dynamically set.
The code was previously only changing the logging level if it wasn't the
default which is accurate for setting the log level once at startup time,
but it needs to set it unconditionally to allow dynamic updates.
2013-11-22 12:46:44 -06:00
Josh Rickmar
ef47455b05 Add listtransactions support to btcctl.
This is currently using the generic reply formater, and will likely be
switched out for a custom one later.
2013-11-22 13:13:39 -05:00
Josh Rickmar
79fe2e594b Fix a typo. 2013-11-22 12:22:07 -05:00
Dave Collins
daa5310e2f Add support for debuglevel RPC command.
Also include the supported subsystems in the error message if an invalid
subsystem is specified.

Closes #15.
2013-11-22 10:47:29 -06:00
Dave Collins
a645c36f45 Add new extension command named debuglevel.
ok @jcvernaleo.
2013-11-22 10:16:45 -06:00
John C. Vernaleo
e930dc55f0 Change a variable name to match btcjson. 2013-11-22 08:50:15 -05:00
John C. Vernaleo
7397dd6896 Rename reqSig to reqSigs
Match bitcoin json name better.

Closes #9
2013-11-22 08:48:02 -05:00
Dave Collins
07c656c8b5 Update doc.go with new debug level usage. 2013-11-21 20:01:11 -06:00
Dave Collins
93c1f7d31b Update utilities to use new btclog as well. 2013-11-21 19:03:55 -06:00
Dave Collins
f7f51a1e43 Use btclog for logging. 2013-11-21 17:44:35 -06:00
Dave Collins
48ab97c271 Allow per-subsystem log levels to be specified.
Now that each subsystem is capable of having its own log level, modify the
-d/--debuglevel flag to allow them to be specified.

Closes #48.
2013-11-21 17:41:45 -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
Owain G. Ainsworth
41d2d36643 Only update p.na on reciept of version message for inbound peers.
Outbound we already have the exact same thing set up, and this should
quieten the race detector. Please note that this does *not* cause
problems with the service flags being wrong. Since by this point we have
already done every thing that would use the service flags from p.na in
addrmanager, and now p.Services is correct..
2013-11-21 19:19:17 +00:00
Owain G. Ainsworth
95b3c063e3 remove lazy computation of QPlus1Div4 and do at init time.
Should shut up the race detector (thought this should be harmless)
2013-11-21 18:59:15 +00:00
Owain G. Ainsworth
8a19f269ca use passed in parameter and not global in log message.
Should shut up the race detector (and make the printf more correct)
2013-11-21 18:23:45 +00:00
Dave Collins
fc11da9ca0 Gofmt. 2013-11-21 09:48:57 -06:00
Dave Collins
3bc401fed1 Use btclog for logging. 2013-11-21 09:48:16 -06:00
Dave Collins
58e5fd3aec Use btclog for logging. 2013-11-21 09:36:58 -06:00
Marco Peereboom
694fccefa8 typo 2013-11-20 15:55:36 -06:00
John C. Vernaleo
3f37e881dc Remove workaround for certs on go1.1.2.
btcd now requires go1.2.  A note to that effect is in README.md.
2013-11-20 15:34:37 -05:00
Josh Rickmar
0bee8478a9 Fix optional arg handling for importprivkey. 2013-11-20 11:12:00 -05:00
Josh Rickmar
fa2bf4423e Add additional tests for importprivkey. 2013-11-20 11:08:20 -05:00
Josh Rickmar
4a290162ee Add dumpprivkey to btcctl. 2013-11-19 22:36:25 -05:00
David Hill
0301690499 Create the home directory if it doesn't exist. 2013-11-19 22:21:50 -05:00
Dave Collins
9643cb6d23 Make golint happy with btcctl. 2013-11-19 20:35:49 -06:00
Dave Collins
b1ed5f75ca Add version to btcctl.
This commit adds version information to btcctl.  The plan is to keep
it in lock step with the btcd version.  It also updates the release script
so the version file is updated automatically with the btcd one.
2013-11-19 20:07:31 -06:00
Dave Collins
9c26f6c4c5 Update doc.go with recent Winows path change. 2013-11-19 18:40:56 -06:00
Dave Collins
0cc756337e Update command line options in doc.go. 2013-11-19 18:16:29 -06:00
Dave Collins
f5a7dcdcbf Default RPC server listener to localhost. 2013-11-19 17:33:36 -06:00
Josh Rickmar
5d13288174 Check auth header for websocket connections. 2013-11-19 18:28:08 -05:00
Dave Collins
9edf7d44fa Ensure generated cert contains 127.0.0.1. 2013-11-19 16:35:00 -06:00
Dave Collins
d18c34a628 Mask the password from btcctl usage. 2013-11-19 16:25:18 -06:00
Dave Collins
02e6d47590 Return error on dir create failure from loadConfig.
Rather than simply exiting on a home directory creation error, return the
error so it exits via the normal path.
2013-11-19 15:56:21 -06:00
David Hill
deb19c2fa3 Bring MarshalECPrivateKey local so < go1.2 works.
Closes #45.
2013-11-19 15:53:31 -06:00
David Hill
35eea401e1 Create the home directory if it doesn't exist. 2013-11-19 16:40:20 -05:00
Dave Collins
c2bec24f51 Improve btcctl config.
This commit improves the configuration for btcctl in several ways:

- Add the ability to specify a config file
- Add a default entry to the rpc cert to point to the location
  it will likely be in the btcd home directory
- Move the config bits into a separate file for easier maintenance
2013-11-19 14:53:22 -06:00
Josh Rickmar
8d9b8fcf82 Make importprivkey rescan optarg default to true. 2013-11-19 15:26:47 -05:00
Dave Collins
04a2f66d64 Allow go-flags to generate help entry in btcctl. 2013-11-19 13:44:52 -06:00
Dave Collins
c3fab78e2c Use consistent case in TLS logging. 2013-11-19 11:42:56 -06:00
Dave Collins
5cd4c8265c Add subsystem to RPC cert generation log messages. 2013-11-19 11:41:31 -06:00
Dave Collins
9a853fdf90 Use single cert/key for RPC by default.
Also, while here, set the default RPC cert/key in the initial config
struct so the default will show when displaying the usage.
2013-11-19 11:38:46 -06:00
David Hill
6fcc1c9d1b Add localhost to DNSNames in generated certificate. 2013-11-19 12:02:40 -05:00
Dave Collins
e433439308 Make RPC section of sample-btcd.conf consistent. 2013-11-19 11:01:23 -06:00
Dave Collins
22600c7c67 Correct a couple of usage inconsistencies.
- Remove periods from --rpccert/--rpckey since none of the other options use
  them
- Make it a little more clear that the --listen and --rpclisten options can be
  used multiple times by changing the summary to start with "Add an ..."
  which also matches the --addpeer style
2013-11-19 10:39:38 -06:00
Marco Peereboom
6ad853019a use fastsha256 2013-11-19 09:26:22 -06:00
Marco Peereboom
aa3cdbe7b1 use fastsha256 2013-11-19 09:22:38 -06:00