如何实现一个监听txpool功能的以太坊客户端
Blog iconshily.eth
Sep 14
官方的 go-ethereum 库使用 SubscribePendingTransactions 监听最新的交易,只能得到对应的 hash 值,为了实现监听 txpool 的功能,需要以下改动 参考下面这个 go-ethereum 的 pr https://github.com/ethereum/go-ethereum/pull/25186 合并该 pr 的代码后,自己 build 出 docker 镜像 然后编写 docker-compose 文件version: "3" services: geth: image: go-ethereum pull_policy: always container_name: gethnode restart: unless-stopped ports: - "30303:30303" - "30303:30303/udp" - "38545:8545" - "38546:8546" volumes: - ./data:/root/.ethereum stop_signal: SIGINT stop_grace_period: 2m comm...

shily.eth

Written by
shily.eth

!

Subscribe

2025 Paragraph Technologies Inc

PopularTrendingPrivacyTermsHome
Search...Ctrl+K

shily.eth

Subscribe