Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
0a09a393
Unverified
Commit
0a09a393
authored
Dec 27, 2020
by
Suriyaa Sundararuban
Committed by
GitHub
Dec 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth/filters: replace wiki links with new doc pages (#22070)
parent
2f810061
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
api.go
eth/filters/api.go
+7
-7
No files found.
eth/filters/api.go
View file @
0a09a393
...
@@ -101,7 +101,7 @@ func (api *PublicFilterAPI) timeoutLoop() {
...
@@ -101,7 +101,7 @@ func (api *PublicFilterAPI) timeoutLoop() {
// It is part of the filter package because this filter can be used through the
// It is part of the filter package because this filter can be used through the
// `eth_getFilterChanges` polling method that is also used for log filters.
// `eth_getFilterChanges` polling method that is also used for log filters.
//
//
// https://
github.com/ethereum/wiki/wiki/JSON-RPC
#eth_newpendingtransactionfilter
// https://
eth.wiki/json-rpc/API
#eth_newpendingtransactionfilter
func
(
api
*
PublicFilterAPI
)
NewPendingTransactionFilter
()
rpc
.
ID
{
func
(
api
*
PublicFilterAPI
)
NewPendingTransactionFilter
()
rpc
.
ID
{
var
(
var
(
pendingTxs
=
make
(
chan
[]
common
.
Hash
)
pendingTxs
=
make
(
chan
[]
common
.
Hash
)
...
@@ -171,7 +171,7 @@ func (api *PublicFilterAPI) NewPendingTransactions(ctx context.Context) (*rpc.Su
...
@@ -171,7 +171,7 @@ func (api *PublicFilterAPI) NewPendingTransactions(ctx context.Context) (*rpc.Su
// NewBlockFilter creates a filter that fetches blocks that are imported into the chain.
// NewBlockFilter creates a filter that fetches blocks that are imported into the chain.
// It is part of the filter package since polling goes with eth_getFilterChanges.
// It is part of the filter package since polling goes with eth_getFilterChanges.
//
//
// https://
github.com/ethereum/wiki/wiki/JSON-RPC
#eth_newblockfilter
// https://
eth.wiki/json-rpc/API
#eth_newblockfilter
func
(
api
*
PublicFilterAPI
)
NewBlockFilter
()
rpc
.
ID
{
func
(
api
*
PublicFilterAPI
)
NewBlockFilter
()
rpc
.
ID
{
var
(
var
(
headers
=
make
(
chan
*
types
.
Header
)
headers
=
make
(
chan
*
types
.
Header
)
...
@@ -287,7 +287,7 @@ type FilterCriteria ethereum.FilterQuery
...
@@ -287,7 +287,7 @@ type FilterCriteria ethereum.FilterQuery
//
//
// In case "fromBlock" > "toBlock" an error is returned.
// In case "fromBlock" > "toBlock" an error is returned.
//
//
// https://
github.com/ethereum/wiki/wiki/JSON-RPC
#eth_newfilter
// https://
eth.wiki/json-rpc/API
#eth_newfilter
func
(
api
*
PublicFilterAPI
)
NewFilter
(
crit
FilterCriteria
)
(
rpc
.
ID
,
error
)
{
func
(
api
*
PublicFilterAPI
)
NewFilter
(
crit
FilterCriteria
)
(
rpc
.
ID
,
error
)
{
logs
:=
make
(
chan
[]
*
types
.
Log
)
logs
:=
make
(
chan
[]
*
types
.
Log
)
logsSub
,
err
:=
api
.
events
.
SubscribeLogs
(
ethereum
.
FilterQuery
(
crit
),
logs
)
logsSub
,
err
:=
api
.
events
.
SubscribeLogs
(
ethereum
.
FilterQuery
(
crit
),
logs
)
...
@@ -322,7 +322,7 @@ func (api *PublicFilterAPI) NewFilter(crit FilterCriteria) (rpc.ID, error) {
...
@@ -322,7 +322,7 @@ func (api *PublicFilterAPI) NewFilter(crit FilterCriteria) (rpc.ID, error) {
// GetLogs returns logs matching the given argument that are stored within the state.
// GetLogs returns logs matching the given argument that are stored within the state.
//
//
// https://
github.com/ethereum/wiki/wiki/JSON-RPC
#eth_getlogs
// https://
eth.wiki/json-rpc/API
#eth_getlogs
func
(
api
*
PublicFilterAPI
)
GetLogs
(
ctx
context
.
Context
,
crit
FilterCriteria
)
([]
*
types
.
Log
,
error
)
{
func
(
api
*
PublicFilterAPI
)
GetLogs
(
ctx
context
.
Context
,
crit
FilterCriteria
)
([]
*
types
.
Log
,
error
)
{
var
filter
*
Filter
var
filter
*
Filter
if
crit
.
BlockHash
!=
nil
{
if
crit
.
BlockHash
!=
nil
{
...
@@ -351,7 +351,7 @@ func (api *PublicFilterAPI) GetLogs(ctx context.Context, crit FilterCriteria) ([
...
@@ -351,7 +351,7 @@ func (api *PublicFilterAPI) GetLogs(ctx context.Context, crit FilterCriteria) ([
// UninstallFilter removes the filter with the given filter id.
// UninstallFilter removes the filter with the given filter id.
//
//
// https://
github.com/ethereum/wiki/wiki/JSON-RPC
#eth_uninstallfilter
// https://
eth.wiki/json-rpc/API
#eth_uninstallfilter
func
(
api
*
PublicFilterAPI
)
UninstallFilter
(
id
rpc
.
ID
)
bool
{
func
(
api
*
PublicFilterAPI
)
UninstallFilter
(
id
rpc
.
ID
)
bool
{
api
.
filtersMu
.
Lock
()
api
.
filtersMu
.
Lock
()
f
,
found
:=
api
.
filters
[
id
]
f
,
found
:=
api
.
filters
[
id
]
...
@@ -369,7 +369,7 @@ func (api *PublicFilterAPI) UninstallFilter(id rpc.ID) bool {
...
@@ -369,7 +369,7 @@ func (api *PublicFilterAPI) UninstallFilter(id rpc.ID) bool {
// GetFilterLogs returns the logs for the filter with the given id.
// GetFilterLogs returns the logs for the filter with the given id.
// If the filter could not be found an empty array of logs is returned.
// If the filter could not be found an empty array of logs is returned.
//
//
// https://
github.com/ethereum/wiki/wiki/JSON-RPC
#eth_getfilterlogs
// https://
eth.wiki/json-rpc/API
#eth_getfilterlogs
func
(
api
*
PublicFilterAPI
)
GetFilterLogs
(
ctx
context
.
Context
,
id
rpc
.
ID
)
([]
*
types
.
Log
,
error
)
{
func
(
api
*
PublicFilterAPI
)
GetFilterLogs
(
ctx
context
.
Context
,
id
rpc
.
ID
)
([]
*
types
.
Log
,
error
)
{
api
.
filtersMu
.
Lock
()
api
.
filtersMu
.
Lock
()
f
,
found
:=
api
.
filters
[
id
]
f
,
found
:=
api
.
filters
[
id
]
...
@@ -410,7 +410,7 @@ func (api *PublicFilterAPI) GetFilterLogs(ctx context.Context, id rpc.ID) ([]*ty
...
@@ -410,7 +410,7 @@ func (api *PublicFilterAPI) GetFilterLogs(ctx context.Context, id rpc.ID) ([]*ty
// For pending transaction and block filters the result is []common.Hash.
// For pending transaction and block filters the result is []common.Hash.
// (pending)Log filters return []Log.
// (pending)Log filters return []Log.
//
//
// https://
github.com/ethereum/wiki/wiki/JSON-RPC
#eth_getfilterchanges
// https://
eth.wiki/json-rpc/API
#eth_getfilterchanges
func
(
api
*
PublicFilterAPI
)
GetFilterChanges
(
id
rpc
.
ID
)
(
interface
{},
error
)
{
func
(
api
*
PublicFilterAPI
)
GetFilterChanges
(
id
rpc
.
ID
)
(
interface
{},
error
)
{
api
.
filtersMu
.
Lock
()
api
.
filtersMu
.
Lock
()
defer
api
.
filtersMu
.
Unlock
()
defer
api
.
filtersMu
.
Unlock
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment