【发布时间】:2020-02-26 03:56:18
【问题描述】:
我无法让 python 函数 web3.geth.txpool.inspect() 工作。
我尝试从命令行、ethereum/client-go 容器和 trufflesuite/ganache-cli:v6.7.0 容器中使用 geth 服务器。
在每种情况下,我都会收到 txpool_inspect 方法丢失错误。我运行的代码很简单,使用 Python 3.7.5 或 3.8:
from web3 import Web3
thing = Web3("http://localhost:42424")
thing.geth.txpool.inspect()
我正在使用 web3py==5.2.2 。
对于 Geth,我尝试过:--dev --mine --rpc --rpcaddr 0.0.0.0 --rpcport 42424 --verbosity 4 我还尝试了各种其他启动选项,似乎没有什么能让我超越主题识别的错误,即 txpool_inspect 不存在或丢失。
我想先让它在测试/开发环境中工作,然后再在真正的区块链上尝试。
建议?
【问题讨论】:
-
web3 服务器正在抛出错误 - 如果我没有说清楚的话。
标签: ethereum web3 go-ethereum geth ganache