Commit graph

23 commits

Author SHA1 Message Date
ditatompel
1429cde662
Uppercase CheckAPI test func
Ref cd52dc7
2024-06-10 03:23:03 +07:00
ditatompel
cd52dc7b70
Lowercase & upperase initialism acronyms
See https://google.github.io/styleguide/go/decisions#initialisms
2024-06-10 03:03:23 +07:00
ditatompel
70372e58ab
Changed the initialization of the countries slice 2024-06-08 00:53:28 +07:00
ditatompel
054a4809dd
No need to use ptr for NetFee 2024-06-08 00:37:26 +07:00
ditatompel
459271408d
test: Unit test for parseStatuses() 2024-06-03 22:18:24 +07:00
ditatompel
ced90fde8e
feat: Function to parse node statuses from report 2024-06-03 22:13:12 +07:00
ditatompel
85f3169689
Only call time.Now() once 2024-06-03 19:26:12 +07:00
ditatompel
54d82e0c8f
fix: RowsPerPage nodes API return zero
Forget to set RowsPerPage response
2024-06-03 13:18:52 +07:00
ditatompel
48fe09c1cb
Adding table tbl_fee
This table used to store majority fee of monero nettype.
By calculating majority fee via "cron" every 300s, the function to
get majority fee for nettypes can be done with single query.

The frontend majority static data in the frontend removed and
now use `/api/v1/fees` endpoint to get majority fee value.

Note: Don't know if it works well with `onload` method or not. Let see.
2024-05-31 16:28:21 +07:00
ditatompel
55f6af1f22
Change estimate fee for stagenet to 56000
TODO: Create in-memory cache for NetFees function.
2024-05-31 13:30:56 +07:00
ditatompel
e83045f8b5
toSQL function for QueryLog struct 2024-05-31 13:04:53 +07:00
ditatompel
8b5bdc7523
toSQL function for QueryProber struct
Make the unit test easier
2024-05-30 20:14:16 +07:00
ditatompel
acc70111c8
fix: slog args message become slog.Attr 2024-05-30 19:41:03 +07:00
ditatompel
a11986ac0c
Separating QueryNode to it's own sql builder func
A quick note that is's ok to use "*" all columns on nodes query
since all columns really want to be displayed to the frontend.
2024-05-30 19:19:03 +07:00
ditatompel
4800bb3284
Adding test and bench example 2024-05-30 15:47:27 +07:00
ditatompel
130cd06dc4
Make X-Prober-Api-Key as constant 2024-05-30 13:40:57 +07:00
ditatompel
0b331ec6c6
Lowercase & upperase initialism acronyms
See https://google.github.io/styleguide/go/decisions#initialisms
2024-05-30 12:46:33 +07:00
ditatompel
38320bc316
Rename NewProberRepo to NewProber
Also rename ProbersQueryParams to QueryProbers
2024-05-27 07:17:27 +07:00
ditatompel
ab82985bdf
Rename MoneroLogQueryParams to QueryLogs
The reason is same with commits reference 99a367f04b
2024-05-27 06:38:11 +07:00
ditatompel
6b5225758e
Rename NewMoneroRepo to just New
Just run `monero.New()` to initialize MoneroRepository.

The database connection is now called from the `New()` function
2024-05-27 06:15:40 +07:00
ditatompel
99a367f04b
chore: Renamed MoneroQueryParams
The `MoneroQueryParams` renamed to `QueryNodes`.
It become much more readable when calling it.

Also added some comment in some functions.
2024-05-27 05:13:03 +07:00
ditatompel
c25e9224b6
lint: No err check 2024-05-24 05:37:27 +07:00
ditatompel
ddc448e90c
Moving monero.go to its own internal package 2024-05-22 22:45:38 +07:00