Commit graph

1597 commits

Author SHA1 Message Date
Dave Collins
e90d95358d Update btcscript import paths to new location. 2015-01-16 19:35:05 -06:00
Dave Collins
528622b259 Update btcchain import paths to new location. 2015-01-16 18:47:50 -06:00
Dave Collins
3951e75a3f Update btcchain import paths to new location. 2015-01-16 18:40:47 -06:00
Dave Collins
0b7a9074ef Update btcdb import paths to new location. 2015-01-16 18:30:32 -06:00
Dave Collins
14056ad2ca Update btcdb import paths to new location. 2015-01-16 18:29:19 -06:00
Dave Collins
bad82efd8c Update btcdb import paths to new location. 2015-01-16 18:26:00 -06:00
Dave Collins
44102d752a Update btcec import paths to new location. 2015-01-16 18:06:03 -06:00
Dave Collins
eb02adfada Update btcec import paths to new location. 2015-01-16 18:05:06 -06:00
Dave Collins
2bd21ead0b Update btcnet import paths to new location. 2015-01-16 17:31:08 -06:00
Dave Collins
f513a56a62 Update btcnet import paths to new location. 2015-01-16 17:29:53 -06:00
Dave Collins
9bb251f530 Update btcnet import paths to new location. 2015-01-16 17:28:19 -06:00
Dave Collins
596fdf8327 Update btcnet import paths to new location. 2015-01-16 17:27:16 -06:00
Dave Collins
5c52f67b4f Update btcwire import paths to new location. 2015-01-16 15:18:22 -06:00
Dave Collins
54ccb83025 Update btcwire import paths to new location. 2015-01-16 15:13:21 -06:00
Dave Collins
1b4d499597 Update btcwire import paths to new location. 2015-01-16 13:59:18 -06:00
Dave Collins
3a35b009ac Update btcwire import paths to new location. 2015-01-16 13:57:29 -06:00
Dave Collins
d3e2947c05 Update btcwire import paths to new location. 2015-01-16 13:54:11 -06:00
Dave Collins
0e8c3b743d Update btclog import paths to new location. 2015-01-16 11:42:25 -06:00
Dave Collins
6efda349da Update btclog import paths to new location. 2015-01-16 11:18:14 -06:00
Dave Collins
e18b38318a Update btclog import paths to new location. 2015-01-16 11:15:32 -06:00
Dave Collins
37d0e1918b Update btclog import paths to new location. 2015-01-16 11:13:42 -06:00
Dave Collins
d9d7f7ce4d Correct address manager test error print. 2015-01-16 10:14:06 -06:00
Dave Collins
b5a7d52f21 Add comments to Tor discovery errors. 2015-01-16 10:11:52 -06:00
Dave Collins
6dcc6e5e66 Update fastsha256 import paths to new location. 2015-01-16 09:17:15 -06:00
Dave Collins
c112c004cf Update log test for upstream seelog changes. 2015-01-16 09:15:43 -06:00
Dave Collins
3172e84bb3 Update fastsha256 import paths to new location. 2015-01-16 09:10:29 -06:00
Dave Collins
2c1923897d Update fastsha256 import paths to new location. 2015-01-16 09:05:26 -06:00
Dave Collins
f4e426c69f Update go-socks import paths to new location. 2015-01-16 01:21:57 -06:00
Dave Collins
8975c0c459 Update go-flags import paths to new location. 2015-01-16 00:56:49 -06:00
Dave Collins
fc6a10c563 Update seelog import paths to new location. 2015-01-15 22:25:41 -06:00
Dave Collins
b732eac0be Update websocket import paths to new location. 2015-01-15 17:20:30 -06:00
Dave Collins
6c5da28550 Update winsvc import paths to new location. 2015-01-15 16:46:18 -06:00
David Hill
81b6031236 Enable the race detector for TravisCI. 2015-01-15 17:14:03 -05:00
Dave Collins
c4f1ed69d2 Update btcutil import paths to new location. 2015-01-15 10:42:26 -06:00
Dave Collins
0864e31a54 Update btcutil import paths to new location. 2015-01-15 10:33:06 -06:00
Dave Collins
58db4a8b7e Update btcutil import paths to new location. 2015-01-15 10:30:38 -06:00
Dave Collins
ee945cdeec Update btcutil import paths to new location. 2015-01-15 10:23:47 -06:00
Dave Collins
97f3917fcf Update goleveldb import paths to new location.
Also update for changes due to the upstream sync.
2015-01-15 03:16:32 -06:00
Dave Collins
a9183f688f Ensure all serialization is using fast path.
The writeElement function provides faster serialization for primitives.
This commit modifies all instances that call writeElement with a
pointer to a primitive or a byte slice to instead use the primitive /
writeVarBytes function so the faster serialization paths are used.
2015-01-14 00:25:04 -06:00
Dave Collins
3ae8056fdb Move the benchmarks into the main btcwire package.
The benchmarks are still only compiled when running 'go test' so this has
no effect on regular usage.  This is being done because benchmarks often
need access to internal state.

Normal tests are kept in a separate package since they also serve to
exercise the public API, and by intentionally making it more difficult to
reach into the internals, it helps ensure the public API is sanely usable.

Since the benchmarks can now access the internals directly, this commit
also removes the functions which exposed the internals to the test package
from internal_test.go which were only used by the benchmarks.
2015-01-14 00:19:07 -06:00
Dave Collins
4589d60212 Don't treat nulldata tx outs as nonstandard dust.
This commit modifies the dust check to exclude transactions with nulldata
outputs so they may be considered standard.
2015-01-11 17:09:11 -06:00
Dave Collins
22c85516e7 Correct sample-btcd.conf RPC listen comment.
The comment for the RPC listen section in the sample-btcd.conf incorrectly
claimed that the default for the RPC server listener is to listen on all
interfaces by default.  In reality, it only listens on localhost for IPv4
and IPv6 by default.

Closes #208.
2015-01-11 17:03:21 -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
Dave Collins
4e41922fe8 Merge branch 'jrick_double_spend_err' of https://github.com/jrick/btcchain into jrick-jrick_double_spend_err 2015-01-08 05:42:40 -06:00
Dave Collins
be91008dc5 Update badges in README.md to SVG.
Also add a license badge while here.
2015-01-08 05:36:41 -06:00
Dave Collins
bf3195e4ae Update TravisCI to goclean script.
- Also update to use the new container-based builds
2015-01-08 05:25:26 -06:00
Dave Collins
d58ea754f3 Add test and infrastructure for block scripts.
This commit adds a test for checking known good block scripts in a block
are valid.  As a part of this, it adds the infastructure needed to load a
saved transaction store from a file which contains all of the input
transactions needed.

It also contains some changes from running goimports as well as some other
cleanup.
2015-01-08 05:10:54 -06:00
Dave Collins
a64ffb820a Correct RPC time handling for getblocktemplate.
This commit modifies the getblocktemplate RPC to correctly handle the
curtime field.

Currently, the RPC server will refuse to serve a block template if the
current time is before the minimum allowed time for a block even though
the real generated block template already accounted for it.

This consists of three changes:
- Remove the unnecessary and incorrect check in the RPC invocation for the
  current time against the min required time since it is already handled
  properly by the block template generation.
- Expose the network time source to the RPC work state and use the
  adjusted time for checking against the maximum allowed time instead of
  the current time.
- Set the returned RPC result curtime field to the time of the generated
  block header.

Fixes #209.
2015-01-08 01:41:50 -06:00
Dave Collins
4b727d2035 Ignore error in script disassembly for RPC results.
This commit modifies the creation of RPC results to ignore errors in
script disassembly since they already contain the error string inline and
the RPC results must still be generated regardless.

This was already done in the decodescript RPC, however the same thing was
not being done in the higher level verbose transaction results.  This
applies to both the createrawtransaction and decoderawtransaction RPCs.

Also, since this was the only thing that could error within those
functions, the error returns and caller checking of now non-existent
errors have been removed.

Fixes #210.
2015-01-07 16:23:23 -06:00
Josh Rickmar
8945620a84 Improve double spend error strings.
The error message now includes both the previous tx hash and output
index, rather than simply the transaction with the already spent
output.
2015-01-06 20:11:42 -05:00