Skip to content

Commit

Permalink
Re-format code using the new gofmt version
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-zimnoch committed Feb 6, 2024
1 parent 110fbb3 commit 3c2274e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
14 changes: 8 additions & 6 deletions cmd/maintainercli.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,14 @@ var estimateDepositsSweepFeeCommand = cobra.Command{
// printDepositsSweepFeeTable prints estimated fees for specific deposits counts
// to the standard output. For example:
//
// ---------------------------------------------
// deposits count total fee (satoshis) sat/vbyte
// 1 201 1
// 2 292 1
// 3 384 1
// ---------------------------------------------
// --------------------------------------------------
// deposits count total fee (satoshis) sat/vbyte
//
// 1 201 1
// 2 292 1
// 3 384 1
//
// --------------------------------------------------
func printDepositsSweepFeeTable(
fees map[int]struct {
TotalFee int64
Expand Down
12 changes: 6 additions & 6 deletions pkg/beacon/dkg/dkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ func waitForDkgResultEvent(
}

// resolveGroupOperators takes two parameters:
// - selectedOperators: Contains addresses of all selected operators. Slice
// length equals to the groupSize. Each element with index N corresponds
// to the group member with ID N+1.
// - operatingGroupMembersIDs: Contains group members IDs that were neither
// disqualified nor marked as inactive. Slice length is lesser than or equal
// to the groupSize.
// - selectedOperators: Contains addresses of all selected operators. Slice
// length equals to the groupSize. Each element with index N corresponds
// to the group member with ID N+1.
// - operatingGroupMembersIDs: Contains group members IDs that were neither
// disqualified nor marked as inactive. Slice length is lesser than or equal
// to the groupSize.
//
// Using those parameters, this function transforms the selectedOperators
// slice into another slice that contains addresses of all operators
Expand Down
3 changes: 2 additions & 1 deletion pkg/bitcoin/bitcoin.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import (
// details of the Bitcoin's CompactSize Unsigned Integer. It represents a
// number value encoded to bytes according to the following rules:
//
// Value | Bytes | Format
// ---------------- Value ---------------- | Bytes | --------------- Format --------------
//
// ---------------------------------------------------------------------------------------
// >= 0 && <= 252 | 1 | uint8
// >= 253 && <= 0xffff | 3 | 0xfd followed by the number as uint16
Expand Down
16 changes: 8 additions & 8 deletions pkg/net/security/handshake/connection_handshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
// responder exchange messages. The entire handshake procedure can be described
// with the following diagram:
//
//
// INITIATOR RESPONDER
// # INITIATOR RESPONDER
//
// [Act 1]
// nonce1 = random_nonce()
// act1Message{nonce1, protocol_id1} ---->
// [Act 2]
// nonce2 = random_nonce()
// challenge = sha256(nonce1 || nonce2)
// <---- act2Message{challenge, nonce2, protocol_id2}
//
// --------------------------------------- [Act 2]
// --------------------------------------- nonce2 = random_nonce()
// --------------------------------------- challenge = sha256(nonce1 || nonce2)
// --------------------------------------- <---- act2Message{challenge, nonce2, protocol_id2}
//
// [Act 3]
// challenge = sha256(nonce1 || nonce2)
// act3Message{challenge} ---->
//
//
// act1Message, act2Message, and act3Message are messages exchanged between
// initiator and responder in acts one, two, and three of the handshake,
// respectively.
Expand All @@ -41,7 +41,7 @@
// state before receiving the first message, there is no representation for
// responder state in the act one.
//
// [RFC]: /docs/rfc/rfc-2-network-security-implementation.adoc
// [RFC]: /docs/rfc/rfc-2-network-security-implementation.adoc
package handshake

import (
Expand Down

0 comments on commit 3c2274e

Please sign in to comment.