【问题标题】:Web3.js >> w3.eth.sendSignedTransaction the txn is submitted but not succesfulWeb3.js >> w3.eth.sendSignedTransaction txn 提交但不成功
【发布时间】:2018-05-24 06:40:39
【问题描述】:

描述::

我有一个签名的 txn,当我使用 w3.eth.sendSignedTransaction 提交它时,我在我的 Geth 日志文件中看到以下日志

Geth日志如下:

INFO [05-24|12:01:44] Submitted transaction                    fullhash=0xd6ad180c709ce93f5884070f28488925e9b944a24fc6ab737c79d8e66dfd9dca recipient=0xF06c0a4A9fafddA7b8B25F986e1C0dfEC62e1E84

如上所示,我获得了 txn 哈希,但现在当我尝试使用哈希搜索我的 txn 时,我得到以下结果 >>

我的问题是 :: 为什么块哈希是 >> 0x0000 。 . . . . ?

这里可能有什么问题?

用于发送此 txn 的代码如下 >>

w3.eth.sendSignedTransaction( data ).once( 'transactionHash', (hash) => {
    console.log(hash)
  }).on('receipt', (receipt) => {
    console.log('receipt');
  }).on('confirmation', (confirmationNumber, receipt) => {
    console.log('confirmation');
  }).on('error', (err) => {
    console.log(err);
  }).then( (receipt) => {
    console.log('finally got the receipt!');
  })
  .catch(e => {
    console.log('err');
  })

【问题讨论】:

  • 看起来交易还没有被挖掘。您是否得到了收据/确认调试输出并在之后检查了块哈希?

标签: node.js blockchain ethereum web3js


【解决方案1】:

我遇到了同样的问题。

当我们的 nonce 不比来自帐户的交易计数高 1 时,就会出现这个问题。 检查以下等式在您的情况下是否为真>>

NONCE = count_of_transactions_from_account + 1 

希望对你有帮助!!!

【讨论】:

    猜你喜欢
    • 2019-12-12
    • 1970-01-01
    • 2018-10-15
    • 1970-01-01
    • 1970-01-01
    • 2013-04-07
    • 1970-01-01
    • 2016-02-26
    • 1970-01-01
    相关资源
    最近更新 更多