Commit Graph

162 Commits

Author SHA1 Message Date
Dave Collins
d078deb4a7 Update addblock util for recent chain API changes. 2014-10-11 13:16:32 -05:00
Dave Collins
02647404fa Prepare for release 0.9.0. 2014-09-20 13:00:02 -05:00
John C. Vernaleo
2480cb3a87 Match error names to btcdb updates. 2014-09-16 15:09:32 -04:00
Josh Rickmar
790f652d06 btcctl: Fix createrawtransaction amounts.
These were being counted in satoshis, when the JSON object should be
containing JSON numbers, counted in BTC.
2014-09-08 11:57:57 -05:00
Dave Collins
cf4f19dd4c Make btcctl errcheck clean.
This commit explicitly ignores errors that were already intentionally
ignored in btcctl by using an _ to make the errcheck utility happy.  It is
also nice to make it explicit that the error is being ignored
intentionally rather than leave questions of whether it was accidentally
forgotten.
2014-08-31 18:14:15 -05:00
David Hill
a429bebbba Pass the correct types for signrawtransaction. 2014-08-31 17:37:49 -05:00
David Hill
8f375ba391 Add getnetworkinfo support to btcctl.
ok @jrick
2014-08-29 09:39:37 -04:00
David Hill
6793bb23ac Display JSON when using btcctl's signrawtransaction. 2014-08-20 11:32:17 -04:00
David Hill
6d739c5a9e Add signrawtransaction to btcctl. 2014-08-20 11:27:27 -04:00
Dave Collins
74386998be Correct the addblock utility import.
This commit corrects the check in the addblock utility to check each block
links the previous hash as intended versus the current block.

Fixes #162.
2014-08-11 01:52:34 -05:00
Javed Khan
458a996ae6 updated utils to handle regtest, simnet
handle active network assignment in the same if-else
instead of having another switch-case
2014-07-22 08:28:33 -05:00
David Hill
f7ce37f8c1 Switch btcctl to use btcutil.Amount. 2014-07-09 16:28:45 -04:00
Josh Rickmar
9e60210f18 Update for untyped btcutil consts.
ok @davecgh
2014-07-08 11:14:46 -05:00
Dave Collins
07bdbd9e3d Update for recent btcdb API changes. 2014-07-07 12:37:30 -05:00
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