[#411] Remove unnecessary pointers for sync objects
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
f934abed8f
commit
faca861451
20 changed files with 39 additions and 64 deletions
|
@ -17,7 +17,7 @@ type BlockTickHandler func()
|
|||
type BlockTimer struct {
|
||||
rolledBack bool
|
||||
|
||||
mtx *sync.Mutex
|
||||
mtx sync.Mutex
|
||||
|
||||
dur BlockMeter
|
||||
|
||||
|
@ -64,7 +64,6 @@ func StaticBlockMeter(d uint32) BlockMeter {
|
|||
// Reset should be called before timer ticking.
|
||||
func NewBlockTimer(dur BlockMeter, h BlockTickHandler) *BlockTimer {
|
||||
return &BlockTimer{
|
||||
mtx: new(sync.Mutex),
|
||||
dur: dur,
|
||||
mul: 1,
|
||||
div: 1,
|
||||
|
@ -80,7 +79,6 @@ func NewBlockTimer(dur BlockMeter, h BlockTickHandler) *BlockTimer {
|
|||
// Do not use delta handlers with pulse in this timer.
|
||||
func NewOneTickTimer(dur BlockMeter, h BlockTickHandler) *BlockTimer {
|
||||
return &BlockTimer{
|
||||
mtx: new(sync.Mutex),
|
||||
dur: dur,
|
||||
mul: 1,
|
||||
div: 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue