gofmt peernet (#103)

This commit is contained in:
Akilan Selvacoumar
2023-02-12 09:59:31 +00:00
committed by GitHub
parent 3a1eece580
commit 9775525d35
95 changed files with 15798 additions and 15794 deletions

View File

@@ -125,6 +125,7 @@ var (
// the arithmetic needed for elliptic curve operations.
//
// The following depicts the internal representation:
//
// -----------------------------------------------------------------
// | n[9] | n[8] | ... | n[0] |
// | 32 bits available | 32 bits available | ... | 32 bits available |
@@ -134,12 +135,14 @@ var (
// -----------------------------------------------------------------
//
// For example, consider the number 2^49 + 1. It would be represented as:
//
// n[0] = 1
// n[1] = 2^23
// n[2..9] = 0
//
// The full 256-bit value is then calculated by looping i from 9..0 and
// doing sum(n[i] * 2^(26i)) like so:
//
// n[9] * 2^(26*9) = 0 * 2^234 = 0
// n[8] * 2^(26*8) = 0 * 2^208 = 0
// ...

View File

@@ -4,6 +4,7 @@
// This file is ignored during the regular build due to the following build tag.
// This build tag is set during go generate.
//go:build gensecp256k1
// +build gensecp256k1
package btcec

View File

@@ -306,7 +306,7 @@ func (ht *hashTable) getTotalNodesPerBucket() (total []int) {
ht.mutex.RLock()
defer ht.mutex.RUnlock()
for n, _ := range ht.RoutingTable {
for n := range ht.RoutingTable {
total = append(total, len(ht.RoutingTable[n]))
}