eth.pendingTransactions和eth.getBlock('pending').transactions有什么区别?
我注意到,有时eth.pendingTransactions有一些eth.getBlock('pending').transactions没有的事务。
发布于 2016-07-01 12:43:01
eth.pendingTransactions是本地Geth节点所拥有的事务,这些事务尚未被挖掘到块中。
eth.getBlock('pending')是节点正在挖掘的当前块(或将在其上进行挖掘)。它不是添加到区块链中的区块。eth.getBlock('pending').transactions是包含在这个假设块中的事务。
如果您正在发送事务,您将首先在eth.pendingTransactions中看到它,然后矿工将它包含在块中。
https://ethereum.stackexchange.com/questions/6720
复制相似问题