Commit Graph

3542 Commits

Author SHA1 Message Date
jolan
fd857d5b53 rpcserver: skip cert create when RPC is disabled 2017-12-16 09:48:40 -06:00
John C. Vernaleo
008e80bf86 Rename one of the testnet seeders. (#873) 2017-12-12 10:57:27 -06:00
jolan
68a9073d29 chaincfg: update checkpoints for 1.1.2 release (#946) 2017-12-12 10:42:47 -06:00
Dave Collins
de705586b9
Sync upstream through da04285. 2017-12-08 12:02:03 -06:00
Dave Collins
8922295ae5
txsort: Implement stable tx sorting package.
This adds a new package under dcrutil named txsort which implements a
standard lexicographical sort order of transaction inputs and outputs.
This is useful to standardize transactions for faster multi-party
agreement as well as preventing information leaks in a single-party use
case.  It is a modified form of BIP69 which has been updated to account
for differences with Decred-specific transactions.

The sort order for transaction inputs is defined as follows:
- Previous transaction tree in ascending order
- Previous transaction hash (treated as a big-endian uint256)
  lexicographically in ascending order
- Previous output index in ascending order

The sort order for transaction outputs is defined as follows:
- Amount in ascending order
- Public key script version in ascending order
- Raw public key script bytes lexicographically in ascending order
2017-12-08 11:22:21 -06:00
Jon Chappelow
86c86d157e rpcclient: json unmarshal into unexported embedded pointer
go1.10 fixes a bug in encoding/json that allowed it to allocate an unexported field, but (*rpcclient.Client).handleMessage relied on this behavior to unmarshal into inMessage.  Address the go1.10 fix by allocating the unexported pointer types (rawResponse and rawNotification).
2017-12-08 11:20:35 -06:00
Donald Adu-Poku
3b49d5aafd dcrjson: update handleSendRawTransaction error handling. (#939)
this adds ErrRPCDuplicateTx for rejected duplicate tx errors.
2017-12-08 09:04:53 -05:00
David Hill
fc31a0b39e multi: remove unused funcs and vars 2017-12-07 21:46:25 -06:00
Donald Adu-Poku
0a4e0022db rpctest: Choose flags based on provided params.
This modifies the rpctest framework to start btcd with the appropriate
network flags depending on the provided parameters.

Previously, it always started btcd with --simnet even if other
parameters, such as those for the regression test network, were
provided.
2017-12-05 15:44:01 +00:00
Federico Gimenez
cf453789c8 update go version for example test run in readme 2017-12-04 13:05:15 -06:00
David Hill
b13f5dfbda travis: add ineffassign linter 2017-12-01 09:14:04 -05:00
Donald Adu-Poku
2d0d42401c txscript: Correct nulldata standardness check. 2017-12-01 01:24:17 +00:00
Dave Collins
084e903479
Sync upstream through 07e1e30. 2017-11-30 17:20:41 -06:00
Maninder Lall
ad33b0e3d3 multi: Handle detected data race conditions
All instances of data race are related to accessing
KnownAddress elements, except for peer.go where its
related to closure.

Following are the changes:
- Add KnownAddress.mtx (sync.Mutex) and used same to
 sync access points
- For peer.go, pass local copy to the closure
2017-12-01 01:54:41 +05:30
Donald Adu-Poku
66bf35020a rpc: Add localaddr and relaytxes to getpeerinfo 2017-11-29 22:21:17 +00:00
jolan
664ccfcc63 rpcserver: skip generating certs when nolisten set 2017-11-28 12:47:26 -06:00
Dave Collins
c75eb02ae7
Sync upstream through 403aaf5. 2017-11-28 12:14:01 -06:00
Donald Adu-Poku
06468ffcfa rpcserver: avoid nested decodescript p2sh addrs 2017-11-28 17:46:41 +00:00
Josh Rickmar
238bef1c80 txscript: Require SHA256 secret hashes for atomic swaps 2017-11-28 10:03:42 -05:00
detailyang
aed4179709 doc: tiny fix url (#928) 2017-11-27 08:35:31 -06:00
Alex Yocom-Piatt
d4172fb0eb Bump for v1.1.2 2017-11-20 18:53:16 -06:00
jolan
520214505e chaincfg: update checkpoints for 1.1.2 release 2017-11-20 18:53:00 -06:00
David Hill
20686cd775 travis: add gosimple linter 2017-11-20 18:49:55 -06:00
Samarth Hattangady
4f023d7260 bloom: Fix link in README.
The link in the dcrd/bloom/README.md page led to a 'Not Found' page on
GoDoc. The link has now been changed.
2017-11-21 00:40:56 +05:30
Josh Rickmar
e145193483 peer: Avoid goroutine leaking during handshake timeout. 2017-11-03 12:54:58 -04:00
Matheus Degiovani
2310b4c096 stake: Add IsStakeSubmission (#907)
* Add IsStakeSubmissionTxOut test

* Simplify test

* Remove mtx argument

* Fix formatting

* Fix comment
2017-11-01 13:36:34 -04:00
detailyang
3f3174c987 rpcserver: nil pointer dereference when submit orphan block 2017-10-26 21:21:50 +08:00
David Hill
f903c700a4 blockchain: remove unused file 2017-10-17 17:52:21 -05:00
David Hill
6df741c633 blockchain: removed unused funcs and vars 2017-10-17 17:52:21 -05:00
shweini
ad08e6ab30 multi: Add NoSplitTransaction to purchaseticket. 2017-10-17 17:46:01 -05:00
David Hill
d27429061b rpcserver: check for error in getwork request. (#898)
This checks the error for UpdateBlockTime.
2017-10-13 14:23:11 -04:00
David Hill
ca452564b3 Use upstream jrick/bitset (#899)
... since no local changes exist.
2017-10-13 09:47:26 -04:00
David Hill
7b9c4fa09c tests: make lockfile test work locally (#894) 2017-10-12 15:24:04 -04:00
David Hill
f586e66427 bloom: workaround go vet issue in example (#895) 2017-10-12 14:43:22 -04:00
Josh Rickmar
65001cd49e hdkeychain: Move to github.com/decred/dcrd/hdkeychain
This change moves the hdkeychain package outside of the dcrutil
directory into its own top-level package.  This change is being made
since hdkeychain only depends on dcrutil's address code, and if the
rpctest integration tests are ever moved outside of the dcrd repo,
hdkeychain will no longer be required to remain in dcrd to avoid a
cyclic dependency.
2017-10-12 08:31:54 -05:00
Nicola Larosa
29616d9d28 bloom: Add missing import to examples. 2017-10-12 07:06:55 -05:00
Dave Collins
83dd384ce7
hdkeychain: Work around go vet issue with examples. 2017-10-11 22:08:33 -05:00
Josh Rickmar
6842aa006d Merge remaining dcrutil code into a dcrd package.
This merge commit adds the following code from the
github.com/decred/dcrutil package into a new
github.com/decred/dcrd/dcrutil package:

* Address handling
* Amount type
* AppDataDir func
* bitflags functions
* Block wrapper type
* Hash160 func
* Tx wrapper type
* WIF type

as well as all tests for this code.

The old github.com/decred/dcrutil/hdkeychain package has also been
merged and moved to github.com/decred/dcrd/dcrutil/hdkeychain.

dcrd packages have been updated to use the new packages and the dep
files have been updated for this change.
2017-10-11 22:06:36 -04:00
Josh Rickmar
8564843206 Import dcrutil repo under dcrutil directory. 2017-10-11 21:29:08 -04:00
David Hill
f1ca8cbd48 travis: test Gopkg.lock (#889) 2017-10-11 18:45:23 -04:00
Dave Collins
80861cacf4
rpcclient: Remove docker info from README.md.
This information no longer applies since the rpcclient was merged into
dcrd proper.
2017-10-11 14:53:36 -05:00
Dave Collins
9db06d4a68
Improve gitignore.
This syncs the .gitignore file with the upstream btcd project since it
shouldn't have been completely changed to begin with.  While here, it
also adds the Decred-specific binaries.
2017-10-11 14:52:00 -05:00
Josh Rickmar
c394c7bd19 Copy github.com/decred/dcrutil/bloom to bloom package.
Use this new bloom package rather than relying on the bloom package
from the dcrutil repo.

Some minor source code changes have been made to conform to the dcrd
linter requirements.
2017-10-11 15:36:57 -04:00
Dave Collins
a4d4179143
rpcclient: Merge dcrrpcclient repo. 2017-10-11 14:25:50 -05:00
Dave Collins
db84c7d0e0
Import dcrrpcclient repo into rpcclient directory.
This commit contains the entire dcrrpcclient repository along with
several changes needed to move all of the files into the rpcclient
directory in order to prepare it for merging.  This does NOT update dcrd
or any of the other packages to use the new location as that will be
done separately.

- All import paths in the old dcrrpcclient files have been changed to
  the new location
- All references to dcrrpcclient as the package name have been changed to
  rpcclient
2017-10-11 14:22:32 -05:00
David Hill
50c2884646 certgen: Add doc.go and README.md (#883) 2017-10-11 11:32:50 -04:00
David Hill
20ae0c1d6d dep: sync third-party deps 2017-10-10 18:30:47 -05:00
Josh Rickmar
27981a5a7d Move self signed certificate code into certgen package.
Use this package instead of relying on dcrutil certificate generation
functions.
2017-10-10 17:23:38 -04:00
David Hill
81e3f0983d gometalinter: run on subpkgs too (#878) 2017-10-10 17:20:40 -04:00
Josh Rickmar
ad851fbca8 Use new github.com/decred/base58 package. 2017-10-10 15:45:53 -04:00