mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-20 03:36:44 +00:00
all: format golang files (#1548)
Co-authored-by: wit <wit765765346@gmail>
This commit is contained in:
parent
03c18e9d47
commit
d9ae317a38
16 changed files with 122 additions and 119 deletions
|
|
@ -19,4 +19,3 @@ import (
|
|||
_ "github.com/XinFinOrg/XDPoSChain/crypto/secp256k1/libsecp256k1/src"
|
||||
_ "github.com/XinFinOrg/XDPoSChain/crypto/secp256k1/libsecp256k1/src/modules/recovery"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
//
|
||||
// Returns:
|
||||
//
|
||||
// item - the fetchRequest
|
||||
// progress - whether any progress was made
|
||||
// throttle - if the caller should throttle for a while
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ func (r *resultStore) SetThrottleThreshold(threshold uint64) uint64 {
|
|||
// wants to reserve headers for fetching.
|
||||
//
|
||||
// It returns the following:
|
||||
//
|
||||
// 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
|
||||
// item - the result to store data into
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
// 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/>.
|
||||
|
||||
//go:build go1.4 && nacl && faketime_simulation
|
||||
// +build go1.4,nacl,faketime_simulation
|
||||
|
||||
package discv5
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
// 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/>.
|
||||
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package netutil
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
// 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/>.
|
||||
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package netutil
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
// 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.
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
|
|
@ -75,7 +74,7 @@ An example server which uses the JSON codec:
|
|||
l, _ := net.ListenUnix("unix", &net.UnixAddr{Net: "unix", Name: "/tmp/calculator.sock"})
|
||||
server.ServeListener(l)
|
||||
|
||||
Subscriptions
|
||||
# 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
|
||||
|
|
@ -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
|
||||
|
||||
Reverse Calls
|
||||
# Reverse Calls
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue