We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ethClient.SubscribeFilterLogs
PlatON version: platon version 1.1.0 OS & Version:Linux Commit hash : (if develop)
platon version 1.1.0
develop
When target event filtered, there should be noticed only once
got noticed twice
package main import ( "context" "fmt" "log" "strings" "math/big" "github.com/PlatONnetwork/PlatON-Go/crypto" "github.com/PlatONnetwork/PlatON-Go" "github.com/PlatONnetwork/PlatON-Go/common" "github.com/PlatONnetwork/PlatON-Go/accounts/abi" "github.com/PlatONnetwork/PlatON-Go/core/types" "github.com/PlatONnetwork/PlatON-Go/ethclient" ) func main() { client, err := ethclient.Dial("wss://devnetopenapi.platon.network/ws") if err != nil { log.Fatal(err) } contractAddress := common.MustBech32ToAddress("lat1xt80enwhxtj2tspr48cv8q9t2sp6shx6klfvmf") query := platon.FilterQuery{ Addresses: []common.Address{contractAddress}, } logs := make(chan types.Log) sub, err := client.SubscribeFilterLogs(context.Background(), query, logs) if err != nil { log.Fatal(err) } for { select { case err := <-sub.Err(): log.Fatal(err) case vLog := <-logs: fmt.Println(vLog) // got noticed twice } } }
vLog
The text was updated successfully, but these errors were encountered:
fixed in #1868
Sorry, something went wrong.
close by done
cheng762
No branches or pull requests
System information
PlatON version:
platon version 1.1.0
OS & Version:Linux
Commit hash : (if
develop
)Expected behaviour
When target event filtered, there should be noticed only once
Actual behaviour
got noticed twice
Steps to reproduce the behaviour
vLog
noticed twice.The text was updated successfully, but these errors were encountered: