Justin Traglia
2c5648d891
all: fix some typos ( #25551 )
...
* Fix some typos
* Fix some mistakes
* Revert 4byte.json
* Fix an incorrect fix
* Change files to fails
2 years ago
Seungbae Yu
029059947a
all: use AbsTime.Add instead of conversion ( #25417 )
2 years ago
Delweng
b196ad1c16
all: add whitespace linter ( #25312 )
...
* golangci: typo
Signed-off-by: Delweng <delweng@gmail.com>
* golangci: add whietspace
Signed-off-by: Delweng <delweng@gmail.com>
* *: rm whitesapce using golangci-lint
Signed-off-by: Delweng <delweng@gmail.com>
* cmd/puppeth: revert accidental resurrection
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2 years ago
Martin Holst Swende
a907d7e81a
all: more linters ( #24783 )
...
This enables the following linters
- typecheck
- unused
- staticcheck
- bidichk
- durationcheck
- exportloopref
- gosec
WIth a few exceptions.
- We use a deprecated protobuf in trezor. I didn't want to mess with that, since I cannot meaningfully test any changes there.
- The deprecated TypeMux is used in a few places still, so the warning for it is silenced for now.
- Using string type in context.WithValue is apparently wrong, one should use a custom type, to prevent collisions between different places in the hierarchy of callers. That should be fixed at some point, but may require some attention.
- The warnings for using weak random generator are squashed, since we use a lot of random without need for cryptographic guarantees.
2 years ago
Felix Lange
9244d5cd61
all: update license headers and AUTHORS from git history ( #24947 )
2 years ago
rjl493456442
7a80cf6543
les, tests: fix vflux fuzzer by removing unnecessary panic ( #24537 )
3 years ago
Felföldi Zsolt
8be8ba450e
les/vflux: fixed panic and data races ( #23865 )
...
* les/vflux/server: fix BalanceOperation
* les/vflux/client: fixed data races
3 years ago
rjl493456442
088bc34194
les/vflux/server: fix metrics ( #22946 )
...
* les/vflux/server: fix metrics
* les/vflux/server: fix metrics
3 years ago
gary rong
6d7c9566df
les, tests: fix les clientpool ( #22756 )
...
* les, tests: fix les clientpool
* tests: disable debug mode
* les: polish code
4 years ago
gary rong
854f068ed6
les: polish code ( #22625 )
...
* les: polish code
* les/vflus/server: fixes
* les: fix lint
4 years ago
Felföldi Zsolt
65689e7fce
les/vflux/server: fix priority cornercase causing fuzzer timeout ( #22650 )
...
* les/vflux/server: fix estimatePriority corner case
* les/vflux/server: simplify inactiveAllowance == 0 case
4 years ago
Felföldi Zsolt
2d89fe0883
les: move client pool to les/vflux/server ( #22495 )
...
* les: move client pool to les/vflux/server
* les/vflux/server: un-expose NodeBalance, remove unused fn, fix bugs
* tests/fuzzers/vflux: add ClientPool fuzzer
* les/vflux/server: fixed balance tests
* les: rebase fix
* les/vflux/server: fixed more bugs
* les/vflux/server: unexported NodeStateMachine fields and flags
* les/vflux/server: unexport all internal components and functions
* les/vflux/server: fixed priorityPool test
* les/vflux/server: polish balance
* les/vflux/server: fixed mutex locking error
* les/vflux/server: priorityPool bug fixed
* common/prque: make Prque wrap-around priority handling optional
* les/vflux/server: rename funcs, small optimizations
* les/vflux/server: fixed timeUntil
* les/vflux/server: separated balance.posValue and negValue
* les/vflux/server: polish setup
* les/vflux/server: enforce capacity curve monotonicity
* les/vflux/server: simplified requestCapacity
* les/vflux/server: requestCapacity with target range, no iterations in SetCapacity
* les/vflux/server: minor changes
* les/vflux/server: moved default factors to balanceTracker
* les/vflux/server: set inactiveFlag in priorityPool
* les/vflux/server: moved related metrics to vfs package
* les/vflux/client: make priorityPool temp state logic cleaner
* les/vflux/server: changed log.Crit to log.Error
* add vflux fuzzer to oss-fuzz
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
4 years ago
Felföldi Zsolt
d96870428f
les: UDP pre-negotiation of available server capacity ( #22183 )
...
This PR implements the first one of the "lespay" UDP queries which
is already useful in itself: the capacity query. The server pool is making
use of this query by doing a cheap UDP query to determine whether it is
worth starting the more expensive TCP connection process.
4 years ago
Felföldi Zsolt
8647233a8e
les: fix balance expiration ( #22343 )
...
* les/lespay/server: fix balance expiration and add test
* les: move client balances to a new db
* les: rename lespayDb to lesDb
4 years ago
Felföldi Zsolt
c027507e03
les: renamed lespay to vflux ( #22347 )
4 years ago