Commit Graph

3677 Commits

Author SHA1 Message Date
Donald Adu-Poku
36c6c7f46e rpcserver: assert network for validateaddress rpc. 2018-01-09 21:03:04 -06:00
Markus Richter
321d5040c2 checkdevpremine: Fix comment
The comment didn't reflect the code (probably a copy and paste error).
2018-01-09 18:33:07 -06:00
Markus Richter
f196b7878f checkdevpremine: Make file naming consistent
Similar to all other utilities in github.com/decred/dcrd/cmd/...
The main Go file for "utility" is usually named utility.go and not
main.go.
2018-01-09 18:33:07 -06:00
Markus Richter
d104ac0ba7 checkdevpremine: Implement --notls option 2018-01-09 18:33:07 -06:00
Markus Richter
0e4b0c8b0d checkdevpremine: Remove --skipverify option
The option --skipverify has never been implemented, therefore it is
better to remove it altogether.
2018-01-09 18:33:07 -06:00
Markus Richter
658286aa2d goimports -w . 2018-01-09 12:43:07 -06:00
Markus Richter
1cd9b6805d docs: document packages and fix typo 2018-01-08 16:04:45 -06:00
Dave Collins
97c4b6b096
sampleconfig: Update min relay fee.
This updates the minimum relay fee in the sample config file to match
the actual default.  Note that it's commented anyways, so this does not
result in any logical change.  However, the file aims to have the
defaults commented out by default, so it makes sense to update the
value accordingly.
2018-01-06 19:26:50 -06:00
Dave Collins
6fcd077696
stake: Override false positive vet error.
This adds a directive to instruct gometalinter to ignore a false
positive produced by vet.  The code in question intentionally makes use
of the property vet is warning about.
2018-01-06 19:23:23 -06:00
Dave Collins
20c9fc9c65
Sync upstream through b8df516. 2018-01-04 21:46:25 -06:00
jolan
73e2d1c2f7 travis: set GOVERSION environment properly 2018-01-02 13:51:39 -06:00
Donald Adu-Poku
bd8ff54a4b docs: Add fullblocktests entry and minor consistency updates 2017-12-31 12:25:01 +00:00
Donald Adu-Poku
e5828813c0 txscript: Remove OP_SMALLDATA 2017-12-29 19:57:26 +00:00
Donald Adu-Poku
29aa087e97 txscript: enforce MaxDataCarrierSize for GenerateProvablyPruneableOut 2017-12-23 01:36:12 +00:00
Donald Adu-Poku
69063fa5f3 rpcserver: remove redundant checks in blockTemplateResult. 2017-12-21 19:44:40 -06:00
Donald Adu-Poku
2be3bf6639 sec256k1: update func signatures.
funcs implicitly use the sec256k1 curve instead of passing it as a
param.
2017-12-21 19:38:42 -06:00
Donald Adu-Poku
106f979fa7 txscript: Cleanup and improve NullDataScript tests.
This modifies the recently-added NullDataScript function in several
ways in an effort to make them more consistent with the tests in the
rest of the code base and improve/correct the logic:

- Use the hexToBytes and mustParseShortForm functions
- Consistently format the test errors
- Replace the valid bool flag with an expected error and test against it
- Ensure the returned script type is the expected type in all cases
2017-12-22 00:58:54 +00:00
Dave Collins
1ca1017813
txscript: Allow external signature hash calc.
This modifies the exported CalcSignatureHash function to accept a script
as bytes instead of an array of parsed opcodes which are not available
to callers outside of the package.

While here, it also adds a proper comment for the exported function
since it is intended for more than testing as the previous comment
claimed.

Finally, it updates the tests to use a valid script instead of the
previous impossible to achieve constructed series of parsed opcodes.
2017-12-21 14:28:22 -06:00
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