rot*_*ten 4 ethereum web3-donotuse go-ethereum geth ganache
我在让 python 函数web3.geth.txpool.inspect() 工作时遇到问题。
我已经尝试从命令行、ethereum/client-go容器和容器中使用 geth 服务器trufflesuite/ganache-cli:v6.7.0。
在每种情况下,我都会收到 txpool_inspect 方法丢失错误。我正在运行的代码非常简单,使用 Python 3.7.5 或 3.8:
from web3 import Web3
thing = Web3("http://localhost:42424")
thing.geth.txpool.inspect()
Run Code Online (Sandbox Code Playgroud)
我正在使用 web3py==5.2.2 。
对于我尝试过的 Geth:--dev --mine --rpc --rpcaddr 0.0.0.0 --rpcport 42424 --verbosity 4 我也尝试了各种其他启动选项,似乎没有什么能让我克服 txpool_inspect 不存在或丢失的主题识别错误。
在真正的区块链上尝试之前,我想先让它在测试/开发环境中工作。
建议?
from web3 import Web3, HTTPProvider
thing = Web3(HTTPProvider("http://localhost:42424"))
thing.geth.txpool.inspect()
Run Code Online (Sandbox Code Playgroud)
--http.api "eth,net,web3,txpool"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1189 次 |
| 最近记录: |