Commit Graph

109 Commits

Author SHA1 Message Date
Donald Adu-Poku
0dbfca4f79
dcrjson: include summary totals in GetBalanceResult.
this adds a collection of summary total fields to the GetBalanceResult
struct which allows providing a summary of totals for all wallet
accounts when using `getbalance "*"`.
2018-02-21 10:10:35 -06:00
David Hill
5fc31ca578 multi: fix misspell linter warnings 2018-02-18 12:26:52 -06:00
David Hill
a261760b9b travis: test in docker container 2018-02-18 10:27:18 -06:00
Donald Adu-Poku
a0438c81c3 rpcserver: add batched request support (json 2.0) 2018-02-13 17:12:08 -06:00
Donald Adu-Poku
0bc305f838 dcrjson: Add SweepAccountCmd & SweepAccountResult. (#1027) 2018-02-12 16:11:46 -05:00
githubsands
3834388096 dcrwalletextcmds: remove getseed
Considering that there is no method for getseed and also that your seed should be saved at wallet creation it seems best to get rid of getseed type and instance function.
2018-01-29 12:02:37 -06:00
Donald Adu-Poku
70bdae7b76 dcrjson: add ticket fee field to PurchaseTicketCmd. 2018-01-28 20:31:17 -06:00
githubsands
0c6b5c369b dcrjson: Update README.md.
Correct the rpcclient link.
2018-01-27 20:38:50 -06:00
Markus Richter
658286aa2d goimports -w . 2018-01-09 12:43:07 -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
b13f5dfbda travis: add ineffassign linter 2017-12-01 09:14:04 -05:00
Donald Adu-Poku
66bf35020a rpc: Add localaddr and relaytxes to getpeerinfo 2017-11-29 22:21:17 +00:00
Donald Adu-Poku
06468ffcfa rpcserver: avoid nested decodescript p2sh addrs 2017-11-28 17:46:41 +00:00
David Hill
20686cd775 travis: add gosimple linter 2017-11-20 18:49:55 -06:00
shweini
ad08e6ab30 multi: Add NoSplitTransaction to purchaseticket. 2017-10-17 17:46:01 -05:00
Donald Adu-Poku
f11fac8134 multi: update stakebase tx vin[0] structure.
modifications to the stakebase tx vin[0] required adding a stakebase
field to Vin and VinPrevOut structs as well as updating the
rpc documentation for the affected calls.
2017-09-23 03:24:55 -05:00
Donald Adu-Poku
83c324c93c dcrjson: add unconfirmed field. (#812) 2017-08-15 14:07:31 -05:00
Donald Adu-Poku
efa3b464d6 dcrjson: move cmd types 2017-08-06 20:53:32 +00:00
Donald Adu-Poku
3bf1b0a31e dcrjson: Remove unused cmds & types. 2017-08-05 17:51:48 -05:00
Alex Yocom-Piatt
9285b49550 dcrjson: add RevokeTicketsCmd (#726) 2017-06-13 12:00:14 -04:00
Josh Rickmar
f01a8bfd7a dcrjson: Add gap policy option to getnewaddress. 2017-06-06 15:02:34 -04:00
Josh Rickmar
b15425411b dcrjson: Remove unnecessary verbose optional parameters. 2017-06-06 10:18:26 -04:00
John C. Vernaleo
e7b128a672 multi: Update markdown in README files to match change in github parser.
This borrows a lot from btcsuite/btcd 9918e2a56196fb6b1b2837a9e7fb84f3454098fd
2017-05-26 12:06:19 -04:00
David Hill
2a2ab090ec dcrjson: getblocksubsidy support. (#679) 2017-05-23 13:09:49 -04:00
Josh Rickmar
39734da2e4 rpcserver: Add existsmissedtickets RPC.
This RPC works identically to the existsexpiredtickets RPC but checks
for missed rather than expired tickets.
2017-05-17 10:24:56 -04:00
Josh Rickmar
489e1c4338 dcrjson: Remove accountfetchaddresses support.
This RPC was removed from wallet.
2017-05-04 13:26:22 -04:00
Dave Collins
05d8456d3e
multi: Rename vote choice IsIgnore to IsAbstain.
This renames the chaincfg parameter for the vote choice which represents
an abstaining vote to be named IsAbstain instead of IsIgnore since that
more accurately describes its intent and behavior.

It also updates the RPC server choice result field for isignore to be
named isabstain to match and bumps the major version accordingly.

Finally, it renames other internal variables which make use of the
choice to include the word abstain as well for clarity and renames a
couple of other internal variables.
2017-04-24 16:17:27 -05:00
Josh Rickmar
ff07aac47f dcrjson: Add getvotechoices/setvotechoice types.
Remove all types for get/setticketvotebits.  These RPCs are being
removed from dcrwallet (which will no longer support saving per-ticket
vote bits).
2017-04-11 12:04:59 -04:00
jolan
2acdc98135 dcrjson: add generatevote and remove some unused pieces (#652) 2017-04-07 12:56:55 -05:00
Marco Peereboom
9b2dcda49c rpcserver: Confirmations -1 when a block is orphan
Make GetBlockHeaderVerboseResult and GetBlockVerboseResult return
Confirmations as -1 when we are dealing with an orphan block.

While here fix confirmations in the createTxRawResult call as well.

Every user of GetBlockHeaderVerboseResult, GetBlockVerboseResult and
TxRawResult MUST change the Confirmations field to int64!

The RPCs that are affected are getblock, getblockheader and
getrawtransaction.
2017-03-14 14:47:39 -05:00
jolan
43bf940cb6 remove walletinfo fields related to stakemining purchaser (#612) 2017-03-10 14:49:26 -05:00
jolan
10adc627c8 add more walletinfo fields (#610) 2017-03-08 16:24:49 -05:00
David Hill
caa57df468 travis: enable gometalinter (#603)
* Hook up gometalinter

* travis: enable unconvert

* travis: enable gosimple
2017-03-08 15:44:15 -05:00
Marco Peereboom
54d1da3151 Convert version array to version:bits tuple. (#586)
Propagate version and bits on the getstakeversions call.  Now we can
interrogate all raw vote version/bits data in addition to cooked values.

Diff is mostly mechanical exporting the Version:Bits tuple.
2017-02-21 12:39:43 -05:00
Josh Rickmar
6ee804dacf Add Go 1.8 support, remove 1.6. (#581)
Go 1.8 is out and by policy we only support the latest two Go releases.
2017-02-16 17:06:33 -05:00
Marco Peereboom
5205214013 davec nits 2017-02-16 11:37:43 -06:00
Marco Peereboom
4b2c7cbf0d Add getstakeversioninfo command. (#568)
The getstakeversioninfo command returns vote and stake versions tally
for N intervals.  It does always start with the current top of the chain
and counts backwards.
2017-02-16 11:54:19 -05:00
Marco Peereboom
b3763d4594 Create a tuple for vote version+bits.
With this change we can keep the version and the bits in blockNode.
This is used to fix an oversight where we weren't strictly enforcing
the vote version.  This also adds tests that validate quorum-1, quorum,
75%-1 and 75% rules during tallying.

Also adjust getvoteinfo totals to only return the specified vote version
totals.
2017-02-15 13:12:23 -06:00
Marco Peereboom
6967358649 blockchain: Implement configurable voting on top of PoS. (#542)
Port BIP0009 over from btcd.  The following is an overview of the
changes:
- Add new configuration options to the chaincfg package which allows the
  rule deployments to be defined per chain
- Implement code to calculate the threshold state as required by voting
  - Use threshold state caches that are stored to the database in order
    to accelerate startup time
  - Remove caches that are invalid due to definition changes in the
    params including additions, deletions, and changes to existing
    entries
  - Verify that PoW and PoS majorities have been reached.
- Add tests for new error type
- Add tests for threshold state
- Deployments are per stake version.
- Add human readable vote/choice infrastructure.
- Add RPC command to interrogate vote status (getvoteinfo).
2017-02-13 13:32:40 -05:00
Marco Peereboom
278a491543 Add block version to getstakeversions (#556) 2017-02-08 15:42:30 -05:00
David Hill
bfc076ecf1 dcrjson: Add negative DecodeConcatenatedHashes tests (#423) 2017-02-03 12:17:42 -05:00
David Hill
7b56d51fb1 dcrjson: Remove balance type from getbalance API (#548) 2017-01-24 10:30:05 -05:00
David Hill
f5c0b7eff2 dcrjson: Add GetAccountBalanceResult and GetBalanceResult (#547) 2017-01-19 11:48:54 -05:00
David Hill
0e91858c85 stake: Add SSGenVoteBitsExtendedMaxSize const (#541) 2017-01-04 18:09:23 -05:00
Marco Peereboom
3e4ed1b49d Implement stake voter version interrogation command. (#522)
Fixes #521
2016-12-21 22:14:13 -06:00
Josh Rickmar
2c648249d5 Fix typo. (#505)
Discovered by @davecgh.
2016-12-06 21:41:05 -05:00
Josh Rickmar
b415e9630d dcrjson: Add rescanwallet JSON-RPC request. (#500)
Closes #499.
2016-12-05 09:18:34 -06:00
Dave Collins
67b9004bab
stake/dcrjson: Simplify code with gofmt -s. 2016-11-21 11:03:17 -06:00
Josh Rickmar
ed7c45a3e1 Use same notification for mined transactions and blocks. (#434)
Change the block connected and disconnected notifications to include
the entire block header.

Do not notify the previous block's regular tree transactions if the
newly attached block voted to approve them.  Instead, notify the
regular transactions from the newly attached block.  It is up to the
client to check the vote bits in the header to decide how to handle
the previous block's regular transactions.

Every websocket client now has an associated transaction filter that
is used to determine whether or not a processed transaction is (or
might be) relevant to the client.  A new RPC, loadtxfilter, has been
added to load, reload, or add to this filter.

Redo the entire rescan RPC to scan over previously-processed blocks
using the same transaction filter (rather than specifying which
addresses and outpoints to watch for in the rescan request).

Fixes #433.
2016-11-08 16:18:32 -05:00
Marco Peereboom
2d242b224e Add StakeVersion bits to various subsystems. (#441)
Bump block version and add stake version to wire.  Currently
StakeVersions are unused and once the enforcement logic goes in the
versions will bump again.

This fixes #435
2016-11-07 13:06:17 -06:00