jholdstock
eb0946fada
Don't write http body on db write error
2020-06-25 15:45:48 +00:00
jholdstock
5e8ef4e7f2
Prefix for dcrd/dcrwallet/db errors
2020-06-25 15:45:01 +00:00
jholdstock
0e953dc225
Add extra debug info to log messages
2020-06-25 15:45:01 +00:00
jholdstock
2c91a9bf9d
Add funcName to middleware logs
2020-06-25 15:45:01 +00:00
jholdstock
f42d3ee62f
Use correct format verb for dcrutil.Amount
2020-06-25 15:45:01 +00:00
jholdstock
9d6cf57219
Add funcName to web api logs
2020-06-25 15:45:01 +00:00
degeri
fdc8f22199
Set autocomplete off for tx search ( #143 )
2020-06-24 11:02:22 +01:00
jholdstock
80f5e6f55c
Extract code to decode tx and validate tickets
2020-06-22 16:23:31 +00:00
jholdstock
ed21f0af64
Don't put request bytes into context.
2020-06-22 16:23:31 +00:00
jholdstock
705ea51fc1
Remove quotes from generic font-family names
2020-06-20 12:51:18 +00:00
jholdstock
892e6c5716
Modernize login and admin pages
2020-06-18 20:18:17 +00:00
jholdstock
03a5ef4fd1
Modernize homepage
2020-06-18 20:18:17 +00:00
jholdstock
600cd7bf9b
Use modern logo and colours.
2020-06-18 20:18:17 +00:00
jholdstock
13c4f4faea
Protect cached vsp stats with mutex.
2020-06-16 14:23:35 +00:00
jholdstock
3a76d44113
Extra ticket hash validation before using db/rpc.
...
Provides extra protection against DoS.
2020-06-15 13:32:51 +00:00
jholdstock
5af2f595ac
Remove //TODOs which are already resolved.
2020-06-15 13:32:05 +00:00
Jamie Holdstock
bfeddd25d1
Download db backup from admin page.
2020-06-12 13:35:43 +00:00
jholdstock
d53676a907
Use middleware to check admin status.
2020-06-12 13:35:43 +00:00
jholdstock
2f7c46e5f8
Misc front end improvements.
...
- Use bootstrap to improve layout.
- Add warning banners for webserver debug mode and vspd closed.
Admin page:
- Replace listing of all tickets with form to search by ticket hash
2020-06-12 13:35:43 +00:00
jholdstock
a304fc9890
Close the database after web server is stopped.
...
Previously all of the shutdown tasks were running concurrently, which meant the db could be closed before the webserver is finished using it.
2020-06-12 13:23:55 +00:00
jholdstock
4f2766352b
Improve handling of fee status.
...
- Fee tx status is now tracked using a dedicated field, with values none/received/broadcast/confirmed/error.
- Fee tx hex and hash are now both set in /payfee. The absense of txhash is no longer used to determine if a fee tx has been broadcast or not.
- setvotechoices can no longer be called before a fee is received.
- Remove `binding:required` from response types. It has no effect on responses, it is only needed on request types which are validated by gin.
2020-06-09 14:17:43 +00:00
jholdstock
6caaac0442
Remove global dcrd/dcrwallet clients
2020-06-09 13:12:43 +00:00
David Hill
83514385d6
change feeamount from float64 to int64/atoms ( #121 )
2020-06-09 08:08:14 +01:00
David Hill
873d89e412
remove fee transactions if dcrd rejects it. ( #114 )
2020-06-08 17:31:22 +01:00
jholdstock
9f48bae78e
Return parsable error codes instead of just a string.
...
Also
- Check if VSP is closed before /payfee
2020-06-08 15:33:06 +00:00
jholdstock
b50615bc6f
Add very basic admin page.
2020-06-08 15:24:49 +00:00
jholdstock
144060c3cb
Add adminpass config item.
2020-06-08 15:24:49 +00:00
jholdstock
9f02063c86
Sign error responses.
2020-06-08 15:21:23 +00:00
jholdstock
0318eded95
Move feeAddressExpiration into webapi package.
2020-06-08 12:27:45 +00:00
jholdstock
443db9a7b9
Log dcrutil.Amount rather than float
2020-06-06 23:15:19 +00:00
jholdstock
4d47bc6df8
Handle "transaction already exists" error
2020-06-05 16:19:46 +00:00
David Hill
eeaefab280
webapi: validate script version in fee transaction ( #112 )
2020-06-05 17:00:13 +01:00
jholdstock
1c92856303
Ensure provided private key matches ticket
2020-06-05 15:33:56 +00:00
jholdstock
a6d9b79619
Tolerate dcrwallet connection failures.
...
If at least 1 wallet connection succeeds, vspd should proceed to use the connected wallet(s). Only error out if all wallet connections fail.
2020-06-04 15:56:43 +00:00
jholdstock
c7835e8811
Update log level and add some TODOs
2020-06-04 15:04:39 +00:00
jholdstock
8a4053f29f
Reinstate check for confirmed tickets.
2020-06-04 15:04:39 +00:00
jholdstock
fc5749545d
Reverse order of addtx and importprivkey
2020-06-04 15:04:39 +00:00
Jamie Holdstock
d407af35c0
Accept feexpub once at startup. ( #97 )
2020-06-03 18:10:30 +01:00
jholdstock
dcfc2e969d
Check if fee already paid before checking if ticket is votable
2020-06-03 15:48:21 +00:00
jholdstock
7da79c7561
Simplify dcrd and dcrwallet client creation.
2020-06-03 15:46:24 +00:00
jholdstock
81a6bf1ea8
Reject unvotable tickets.
...
/payfee and /getaddress will now only accept tickets which are immature or live.
2020-06-03 12:49:14 +00:00
jholdstock
1270f77fd6
Return err if fee tx already received.
2020-06-03 12:45:42 +00:00
jholdstock
2a476d9589
Validate fee config
2020-06-03 12:43:14 +00:00
jholdstock
86fdf888da
Move to decred github org
2020-05-28 12:29:42 -05:00
Jamie Holdstock
4b2a68ea48
Populate ticket status response. ( #82 )
2020-05-28 18:05:56 +01:00
Jamie Holdstock
1a507badc2
Multi wallet fix ( #83 )
...
* Fix min required check
* Remove duplicated host logging on conn errors.
* Show confirmed tickets on homepage.
2020-05-28 15:01:44 +01:00
jholdstock
225dcaf29e
multi wallet support ( #32 )
...
* multiwallet
* print host
Co-authored-by: Jamie Holdstock <jholdstock@decred.org>
2020-05-28 12:52:06 +01:00
Jamie Holdstock
6a100811f4
Enable pool closure ( #80 )
...
* Enable pool closure.
* Move homepage to its own file
* Docs and rename status>info
2020-05-28 07:07:33 +01:00
Jamie Holdstock
e65a7fdbf3
Set values early to prevent races ( #77 )
2020-05-28 06:58:44 +01:00
Jamie Holdstock
d275fddf1b
Remove votechoices from setVoteChoices response. ( #81 )
2020-05-28 06:58:26 +01:00