[英]SendRawTransaction return hash, but there is no transaction
I want a make some transactions.我想做一些交易。 Did like mentioned here喜欢这里提到的
sendRawTransaction return me hash of transaction. sendRawTransaction 向我返回交易的 hash。 But there is not any transaction.但是没有任何交易。 My pending transactions count is 0. When I call getTransaction method with that hash, the result is我的待处理事务计数为 0。当我使用该 hash 调用 getTransaction 方法时,结果是
{
'blockHash': None,
'blockNumber': None,
'from': 'my address',
'gas': 118685,
'gasPrice': 1000000000,
'hash': HexBytes('some hash'),
'input': 'some long hash',
'nonce': 1254,
'r': HexBytes('...'),
's': HexBytes('...'),
'to': 'my contract address',
'transactionIndex': None,
'v': 42,
'value': 0
}
What can be the reason?可能是什么原因?
By the documentation of getTransaction
, it returns a transaction only after the transaction is mined.根据getTransaction
的文档,它仅在交易被挖掘后才返回交易。 You can wait for it to be mined using the waitForTransactionReceipt
method .您可以使用waitForTransactionReceipt
方法等待它被挖掘。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.