Copyedit docs

This commit is contained in:
Roy Crihfield 2023-06-02 22:20:24 +08:00
parent 0deaa33408
commit 3e7ceda110
6 changed files with 22 additions and 22 deletions

View File

@ -49,6 +49,6 @@ A simple implimentation would look like so:
Access
******
As with pre-built plugins, a``.so`` will need to be built from``main.go`` and moved into ``~/.ethereum/plugins``. Geth will need to be started with with a ``http.api=mymamespace`` flag. Additionally you will need to include a ``--http`` flag in order to access the standard json rpc methods.
As with pre-built plugins, a``.so`` will need to be built from``main.go`` and moved into ``~/.ethereum/plugins``. Geth will need to be started with with a ``http.api=mynamespace`` flag. Additionally you will need to include a ``--http`` flag in order to access the standard json rpc methods.
The plugin can now be accessed with an rpc call to ``mynamespace_helloWorld``.

View File

@ -26,7 +26,7 @@ Hooks are called from functions within the plugin. For example, if we wanted to
backend.ChainDb().Put(append([]byte("su"), blockRoot.Bytes()...), data)
}
Many hooks can be deployed in an one plugin as is the case with the **BlockUpdater** plugin.
Many hooks can be deployed in one plugin as is the case with the **BlockUpdater** plugin.
.. contents:: :local:
@ -87,9 +87,9 @@ NewHead
**Function Signature**:``func(*types.Block, common.Hash, []*types.Log)``
Invoked when a new block becomes the canonical latest block. Returns a block, hash, and log.
Invoked when a new block becomes the canonical latest block. Returns a block, hash, and logs.
.. note:: If severtal blocks are processed in a group (such as
.. note:: If several blocks are processed in a group (such as
during a reorg) this may not be called for each block. You should track the prior latest head if you need to process intermediate blocks.
NewSideBlock
@ -97,7 +97,7 @@ NewSideBlock
**Function Signature**:``func(*types.Block, common.Hash, []*types.Log)``
Invoked when a block is side-chained. Returns a block, has, and logs.
Invoked when a block is side-chained. Returns a block, hash, and logs.
.. note:: Blocks passed to this method are non-canonical blocks.

View File

@ -31,7 +31,7 @@ GetFeed
=======
``GetFeed() Feed``
Returns a new feed that the plugin can used for publish/subscribe models.
Returns a new feed that the plugin can use for publish/subscribe models.
For example:

View File

@ -32,7 +32,7 @@ A GetAPIs method is required in the body of the plugin in order to make the plug
Subscription Function
*********************
For subscriptions (supported on IPC and websockets), a function should take MyService as a reciever and a context.Context object as an argument and return a channel and an error. The following is a subscription function that impliments a timer.
For subscriptions (supported on IPC and websockets), a function should take MyService as a reciever and a context.Context object as an argument and return a channel and an error. The following is a subscription function that implements a timer.
.. code-block:: Go
@ -64,7 +64,7 @@ Access
.. Note:: Plugins providing subscriptions can be accessed via IPC
and websockets. In the below example we will be using `wscat`_ to connect a websocket to a local Geth node.
As with pre-built plugins, a ``.so`` will need to be built from ``main.go`` and moved into ``~/.ethereum/plugins``. Geth will need to be started with with ``--ws --ws.api=mynamespace``flags. Additionally you will need to include a ``--http`` flag in order to access the standard json rpc methods.
As with pre-built plugins, a ``.so`` will need to be built from ``main.go`` and moved into ``~/.ethereum/plugins``. Geth will need to be started with ``--ws --ws.api=mynamespace`` flags. Additionally you will need to include a ``--http`` flag in order to access the standard json rpc methods.
After starting Geth, from a seperate terminal run:

View File

@ -22,7 +22,7 @@ First an empty MyService Struct.
Map
***
Next, a map of tracers to functions returning a ``core.TracerResult`` which will be implimented like so:
Next, a map of tracers to functions returning a ``core.TracerResult`` which will be implemented like so:
.. code-block:: Go

View File

@ -15,7 +15,7 @@ These plugins provide new json rpc methods to access several objects containing
Subcommand
------------
A subcommand redifines the total behavior of Geth and could stand on its own. In contrast with the other plugin types which, in general, are meant to capture and manipulate information, a subcommand is meant to change the overall behavior of Geth. It may do this in order to capture information but the primary fuctionality is a modulation of geth behaviour.
A subcommand redefines the total behavior of Geth and could stand on its own. In contrast with the other plugin types which, in general, are meant to capture and manipulate information, a subcommand is meant to change the overall behavior of Geth. It may do this in order to capture information but the primary fuctionality is a modulation of geth behaviour.
Tracers
-------