Skip to content

Commit

Permalink
Re-format code
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-zimnoch committed Nov 24, 2023
1 parent 389991c commit 0b8358e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions pkg/tbtc/coordination.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func watchCoordinationWindows(
for {
select {
case block := <-blocksChan:
if block % coordinationFrequencyBlocks == 0 {
if block%coordinationFrequencyBlocks == 0 {
// Make sure the current window is not the same as the last one.
// There is no guarantee that the block channel will not emit
// the same block again.
Expand All @@ -108,7 +108,7 @@ func watchCoordinationWindows(
type coordinationResult struct {
actionType WalletActionType
//lint:ignore U1000 This function will be used in the future.
proposal interface{}
proposal interface{}
}

func (cr *coordinationResult) String() string {
Expand All @@ -135,11 +135,11 @@ func newCoordinationExecutor(
protocolLatch *generator.ProtocolLatch,
) *coordinationExecutor {
return &coordinationExecutor{
lock: semaphore.NewWeighted(1),
signers: signers,
broadcastChannel: broadcastChannel,
lock: semaphore.NewWeighted(1),
signers: signers,
broadcastChannel: broadcastChannel,
membershipValidator: membershipValidator,
protocolLatch: protocolLatch,
protocolLatch: protocolLatch,
}
}

Expand All @@ -165,4 +165,4 @@ func (ce *coordinationExecutor) coordinate(
// context.

return nil, nil
}
}
18 changes: 9 additions & 9 deletions pkg/tbtc/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ func newNode(
scheduler.RegisterProtocol(latch)

node := &node{
groupParameters: groupParameters,
chain: chain,
btcChain: btcChain,
netProvider: netProvider,
walletRegistry: walletRegistry,
walletDispatcher: newWalletDispatcher(),
protocolLatch: latch,
signingExecutors: make(map[string]*signingExecutor),
groupParameters: groupParameters,
chain: chain,
btcChain: btcChain,
netProvider: netProvider,
walletRegistry: walletRegistry,
walletDispatcher: newWalletDispatcher(),
protocolLatch: latch,
signingExecutors: make(map[string]*signingExecutor),
coordinationExecutors: make(map[string]*coordinationExecutor),
}

Expand Down Expand Up @@ -653,7 +653,7 @@ type coordinationLayerSettings struct {
walletPublicKey *ecdsa.PublicKey,
) (*coordinationResult, bool)

// processCoordinationResultFn is a function processing the given
// processCoordinationResultFn is a function processing the given
// coordination result.
processCoordinationResultFn func(
node *node,
Expand Down

0 comments on commit 0b8358e

Please sign in to comment.