Commit Graph

10 Commits

Author SHA1 Message Date
Dave Collins
4d20cc1217
stake/multi: Don't return errors for IsX functions.
This modifies the IsSStx, IsSSGen, and IsSSRtx functions to only return
a bool and introduces CheckSStx, CheckSSGen, and CheckSSRtx to return
the actual error as needed by consensus.

This is being done because "is" functions are much nicer to use when
they don't return an error and the callers that use them almost never
care why they aren't of the type, they just want to determine if they
are.  In the few cases where the caller does care, they can use of the
new check functions.

While here, also update the comments to call out what the more common
names for the transaction types are and to add comments to the test
functions for consistency.

Finally, it updates all callers in the repo accordingly.
2018-01-30 10:20:12 -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
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
Dave Collins
a4d4179143
rpcclient: Merge dcrrpcclient repo. 2017-10-11 14:25:50 -05:00
Donald Adu-Poku
539fb844cc glide: use jessevdk/go-flags for consistency. 2017-08-30 19:08:18 -05:00
Josh Rickmar
d58299b059 Replace some unnecessary dcrutil.Tx usage with wire.MsgTx. (#419) 2016-10-12 13:57:47 -04:00
Dave Collins
fcaaa94d38 Introduce a new utility to show dev premine taint.
This introduces a new utility named checkdevpremine which can be used to
test transactions to determine whether or not they have inputs that
trace back to the original dev premine coins.
2016-04-04 22:00:19 -05:00