all: format golang files (#1548)

Co-authored-by: wit <wit765765346@gmail>
This commit is contained in:
wit liu 2025-09-21 19:41:54 +08:00 committed by GitHub
parent 03c18e9d47
commit d9ae317a38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 122 additions and 119 deletions

View file

@ -19,4 +19,3 @@ import (
_ "github.com/XinFinOrg/XDPoSChain/crypto/secp256k1/libsecp256k1/src" _ "github.com/XinFinOrg/XDPoSChain/crypto/secp256k1/libsecp256k1/src"
_ "github.com/XinFinOrg/XDPoSChain/crypto/secp256k1/libsecp256k1/src/modules/recovery" _ "github.com/XinFinOrg/XDPoSChain/crypto/secp256k1/libsecp256k1/src/modules/recovery"
) )

View file

@ -477,6 +477,7 @@ func (q *queue) ReserveReceipts(p *peerConnection, count int) (*fetchRequest, bo
// to access the queue, so they already need a lock anyway. // to access the queue, so they already need a lock anyway.
// //
// Returns: // Returns:
//
// item - the fetchRequest // item - the fetchRequest
// progress - whether any progress was made // progress - whether any progress was made
// throttle - if the caller should throttle for a while // throttle - if the caller should throttle for a while

View file

@ -71,6 +71,7 @@ func (r *resultStore) SetThrottleThreshold(threshold uint64) uint64 {
// wants to reserve headers for fetching. // wants to reserve headers for fetching.
// //
// It returns the following: // It returns the following:
//
// stale - if true, this item is already passed, and should not be requested again // stale - if true, this item is already passed, and should not be requested again
// throttled - if true, the store is at capacity, this particular header is not prio now // throttled - if true, the store is at capacity, this particular header is not prio now
// item - the result to store data into // item - the result to store data into

View file

@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License // You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
//go:build go1.4 && nacl && faketime_simulation
// +build go1.4,nacl,faketime_simulation // +build go1.4,nacl,faketime_simulation
package discv5 package discv5

View file

@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License // You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
//go:build !windows
// +build !windows // +build !windows
package netutil package netutil

View file

@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License // You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
//go:build windows
// +build windows // +build windows
package netutil package netutil

View file

@ -15,7 +15,6 @@
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
/* /*
Package rpc implements bi-directional JSON-RPC 2.0 on multiple transports. Package rpc implements bi-directional JSON-RPC 2.0 on multiple transports.
It provides access to the exported methods of an object across a network or other I/O It provides access to the exported methods of an object across a network or other I/O
@ -23,7 +22,7 @@ connection. After creating a server or client instance, objects can be registere
them visible as 'services'. Exported methods that follow specific conventions can be them visible as 'services'. Exported methods that follow specific conventions can be
called remotely. It also has support for the publish/subscribe pattern. called remotely. It also has support for the publish/subscribe pattern.
RPC Methods # RPC Methods
Methods that satisfy the following criteria are made available for remote access: Methods that satisfy the following criteria are made available for remote access:
@ -75,7 +74,7 @@ An example server which uses the JSON codec:
l, _ := net.ListenUnix("unix", &net.UnixAddr{Net: "unix", Name: "/tmp/calculator.sock"}) l, _ := net.ListenUnix("unix", &net.UnixAddr{Net: "unix", Name: "/tmp/calculator.sock"})
server.ServeListener(l) server.ServeListener(l)
Subscriptions # Subscriptions
The package also supports the publish subscribe pattern through the use of subscriptions. The package also supports the publish subscribe pattern through the use of subscriptions.
A method that is considered eligible for notifications must satisfy the following A method that is considered eligible for notifications must satisfy the following
@ -101,7 +100,7 @@ the client and server. The server will close the connection for any write error.
For more information about subscriptions, see https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub For more information about subscriptions, see https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub
Reverse Calls # Reverse Calls
In any method handler, an instance of rpc.Client can be accessed through the In any method handler, an instance of rpc.Client can be accessed through the
ClientFromContext method. Using this client instance, server-to-client method calls can be ClientFromContext method. Using this client instance, server-to-client method calls can be