Commit graph

148 commits

Author SHA1 Message Date
David Hill
2e029b1c3d Add gettxout to btcctl. 2014-07-04 10:50:57 -04:00
Tomás Senart
f439dece37 Use chan struct{} for semaphores
With semaphores we don't actually care about the value passed in. It
makes sense to use a 0 bytes type in these cases.
There is also the added benefit of compiler optimisations for this
specific use case as described here:
https://docs.google.com/document/d/1yIAYmbvL3JxOKOjuCyon7JhW4cSv1wy5hC0ApeGMV9s/pub
2014-07-02 19:06:32 -05:00
Tomás Senart
a0f20007c5 golint -min_confidence=0.3 .
This commits removes a number of golint warnings. There is a class of
warnings which I can't fix due to unsufficient knowledge of the domain
at this point. These are listed here:

addrmanager.go:907:1: comment on exported method AddrManager.Attempt
should be of the form "Attempt ..."
addrmanager.go:1048:1: exported function RFC1918 should have comment or
be unexported
addrmanager.go:1058:1: exported function RFC3849 should have comment or
be unexported
addrmanager.go:1065:1: exported function RFC3927 should have comment or
be unexported
addrmanager.go:1073:1: exported function RFC3964 should have comment or
be unexported
addrmanager.go:1081:1: exported function RFC4193 should have comment or
be unexported
addrmanager.go:1089:1: exported function RFC4380 should have comment or
be unexported
addrmanager.go:1097:1: exported function RFC4843 should have comment or
be unexported
addrmanager.go:1105:1: exported function RFC4862 should have comment or
be unexported
addrmanager.go:1113:1: exported function RFC6052 should have comment or
be unexported
addrmanager.go:1121:1: exported function RFC6145 should have comment or
be unexported
addrmanager.go:1128:1: exported function Tor should have comment or be
unexported
addrmanager.go:1143:1: exported function Local should have comment or be
unexported
addrmanager.go:1228:2: exported const InterfacePrio should have comment
(or a comment on this block) or be unexported
discovery.go:26:2: exported var ErrTorInvalidAddressResponse should have
comment or be unexported
limits/limits_unix.go:19:1: exported function SetLimits should have
comment or be unexported
limits/limits_windows.go:7:1: exported function SetLimits should have
comment or be unexported
util/dropafter/dropafter.go:22:6: exported type ShaHash should have
comment or be unexported
util/dropafter/dropafter.go:38:2: exported const ArgSha should have
comment (or a comment on this block) or be unexported
util/dropafter/dropafter.go:128:5: exported var ErrBadShaPrefix should
have comment or be unexported
util/dropafter/dropafter.go:129:5: exported var ErrBadShaLen should have
comment or be unexported
util/dropafter/dropafter.go:130:5: exported var ErrBadShaChar should
have comment or be unexported
util/showblock/showblock.go:24:6: exported type ShaHash should have
comment or be unexported
util/showblock/showblock.go:46:2: exported const ArgSha should have
comment (or a comment on this block) or be unexported
util/showblock/showblock.go:163:1: exported function DumpBlock should
have comment or be unexported
util/showblock/showblock.go:211:5: exported var ErrBadShaPrefix should
have comment or be unexported
util/showblock/showblock.go:212:5: exported var ErrBadShaLen should have
comment or be unexported
util/showblock/showblock.go:213:5: exported var ErrBadShaChar should
have comment or be unexported
2014-07-02 11:01:56 -05:00
Tomás Senart
84fa553b65 Split imports into logical groups 2014-07-02 15:56:41 +02:00
Dave Collins
84af0d500f Update for SubmitBlockOptions field name change. 2014-06-27 00:27:32 -05:00
Dave Collins
59731e552b Update addblock for ProcessBlock behavior flags. 2014-06-26 17:42:13 -05:00
Dave Collins
21872ecdaa Update for recent btcchain ProcessBlock API change.
Now that the ProcessBlock function returns whether or not the block was an
orphan, the code which requests the parent blocks from the peer that sent
them has been moved to directly after the call to it.

This makes the handling more obvious and has allowed removal of the
blockPeer map which was kept so the notification handler could identify
which peer to request the blocks from.

ok @jrick
2014-06-25 17:46:11 -05:00
Josh Rickmar
d2d518a8e4 btcctl: Add lockunspent support.
ok @davecgh
2014-06-24 18:36:05 -05:00
Dave Collins
f0c05c76d3 Add getmininginfo to btcctl. 2014-06-11 22:41:22 -05:00
David Hill
f67358d4db Add estimatefee and estimatepriority to btcctl. 2014-06-11 11:12:27 -04:00
Dave Collins
0d2c5a8ffb Add --simnet option to btcctl.
This flag works similar to the existing --testnet flag does.  That is to
say it selects the default simulation test network RPC port for either
btcd or btcwallet depending on whether or not the --wallet flag is also
present.
2014-05-30 19:05:06 -05:00
Dave Collins
4328461f36 Update for recent btcchain and btcnet API changes. 2014-05-27 10:12:59 -05:00
Dave Collins
009c4bcd76 Update findcheckpoint utility to use btcnet. 2014-05-27 00:56:54 -05:00
Dave Collins
dd8265c22c Convert addblock utility to use btcnet. 2014-05-27 00:48:00 -05:00
Dave Collins
7b0116dfd0 Prepare for release 0.8.0. 2014-05-25 15:52:47 -05:00
Dave Collins
aa1d722dd6 Update pre-release and README.me to beta.
This is part of the changes for #130.
2014-05-23 15:51:45 -05:00
David Hill
225f6d3d06 Add setgenerate to btcctl 2014-05-16 12:06:09 -04:00
Dave Collins
d6f7adeba8 Improve btcctl handling of empty RPC data returns.
There are several RPCs which do not return any data on success.  btcctl
was improperly treating this as an error condition.
2014-05-13 15:25:36 -05:00
David Hill
ce142e8ca2 add getblockchaininfo to btcctl 2014-05-13 11:35:59 -04:00
Dave Collins
a0bfde8db0 Update btcctl for latest btcjson changes. 2014-04-10 21:12:40 -05:00
David Hill
384a535f49 addmultisigaddress support for btcctl 2014-04-07 14:45:42 -04:00
David Hill
5fcdfb040a add importwallet to btcctl 2014-03-24 15:52:40 -04:00
Dave Collins
ee19fd79e4 Fix comment typo in addblock. 2014-03-20 00:37:35 -05:00
Dave Collins
9f1382f03c Use defaults in config struct for btcctl.
Rather than doing a lot of if/else in the configuration load for btcctl,
set the default for the RPC server to localhost and the RPC cert to the
btcd cert, then override them as needed depending on the --wallet and
--testnet flags.
2014-03-19 23:52:22 -05:00
David Hill
a94ca01cf4 add --testnet and --wallet options to btcctl.
Closes #112
2014-03-20 00:17:26 -04:00
Dave Collins
ae89f7aa82 Expand btcctl RPC cert path to from config file.
This commit allows paths in the btcctl config file to use environment
variables and ~ as a shortcut for the home directory.

Closes #113.
2014-03-19 15:24:14 -05:00
Dave Collins
083f5e007c Correct the new addblock progress logging.
The code was not resetting the counters when logging a message, so the
stats kept increasing rather than showing the number of items processed
since the last log message.

This has been resolved by copying the log function directly from btcd and
modifying it slightly to work with the importer.
2014-03-19 15:11:50 -05:00
Dave Collins
0b73e14e79 Remove extraneous space and go fmt. 2014-03-19 09:47:49 -05:00
Jimmy Song
b12e2fc1db Issue #90: Improve addblock logging by reporting every 10 seconds instead of X number of blocks
blockImporter now has these new properties:

txProcessed - number of transactions processed by the importer
lastHeight - height of the last imported block
lastBlockTime - block time of the last imported block
lastLogTime - last timestamp of when a progress message was shown

the p/progress option in addblocks now indicates how often you want the progress message to appear
2014-03-19 09:35:19 -05:00
Josh Rickmar
675f967d4a Add createencryptedwallet support to btcctl.
This is a btcwallet extension and will not work when talking to btcd
or bitcoind.
2014-03-18 10:50:38 -05:00
Dave Collins
40cdacde23 Prepare for release 0.7.0. 2014-02-20 15:51:40 -06:00
Owain G. Ainsworth
33082445c5 Add signmessage support to btcctl 2014-02-12 15:30:05 +00:00
Dave Collins
db87b9e85f Update btcctl getwork for latest btcjson changes. 2014-02-11 16:47:25 -06:00
Dave Collins
476000193f Implement getnetworkhashps RPC.
Closes #87.
2014-02-07 16:32:11 -06:00
Dave Collins
02e594f826 Add getnetworkhashps to btcctl. 2014-02-05 15:33:32 -06:00
Owain G. Ainsworth
75b59ef6e4 Add gettransaction to btcctl. 2014-02-05 17:39:25 +00:00
Dave Collins
6f5f582c42 Implement getnettotals RPC.
Also, change the display handler for getnettotals in btcctl to the JSON
display handler for better display.

Closes #84.
2014-02-05 09:39:03 -06:00
Dave Collins
7cfef69f23 Prepare for release 0.6.0. 2014-02-04 17:38:24 -06:00
David Hill
c1df0bfce6 get rid of redundant &handlerData 2014-02-04 15:49:31 -05:00
Josh Rickmar
979357c5f1 Add sendtoaddress support to btcctl. 2014-02-04 13:18:58 -05:00
Dave Collins
aab3a6643c Add getnettotals to btcctl. 2014-02-04 01:27:00 -06:00
David Hill
79ff9b76ee add verifymessage to btcctl 2014-01-30 13:26:15 -05:00
David Hill
bd0c799e2f add validateaddress to btcctl 2014-01-30 13:14:28 -05:00
David Hill
9c2abd1fa1 add listreceivedbyaccount and listreceivedbyaddress to btcctl 2014-01-30 13:10:43 -05:00
David Hill
1a64f33fca add listunspent to btcctl 2014-01-30 12:59:26 -05:00
David Hill
ed4ffc44a1 add listlockunspent to btcctl 2014-01-30 12:31:56 -05:00
David Hill
0951ffa1c7 add listaddressgroupings to btcctl 2014-01-30 12:29:21 -05:00
David Hill
ea689489d3 add gettxoutsetinfo to btcctl 2014-01-30 12:23:38 -05:00
David Hill
46709bda08 add getrawchangeaddress to btcctl 2014-01-30 12:19:04 -05:00
David Hill
8749cde081 add getreceivedbyaccount and getreceivedbyaddress to btcctl 2014-01-30 12:08:50 -05:00