Ethereum tx没有';我没有正确的时间。帐户的nonce为:5 tx的nonce为:15

Ethereum tx没有';我没有正确的时间。帐户的nonce为:5 tx的nonce为:15,ethereum,truffle,consensys-truffle,Ethereum,Truffle,Consensys Truffle,使用truffle(3.4.6)、metamask(3.9.2)和testrpc(4.0.1),我调用一个事务并得到“错误:发送没有正确的nonce。帐户的nonce为:5,发送的nonce为:15”。我已经将我的合同方法的主体缩减为一些琐碎的东西,我仍然得到了这些。知道是什么原因吗 contract MyContract { mapping (address => bool) authorized; function myMethod (uint element, uint p

使用truffle(3.4.6)、metamask(3.9.2)和testrpc(4.0.1),我调用一个事务并得到“错误:发送没有正确的nonce。帐户的nonce为:5,发送的nonce为:15”。我已经将我的合同方法的主体缩减为一些琐碎的东西,我仍然得到了这些。知道是什么原因吗

contract MyContract {
  mapping (address => bool) authorized;

  function myMethod (uint element, uint price) whenNotPaused returns (bool) {
     if (!authorized[msg.sender]) throw;
     return true;
  }
}
我这样调用该方法(使用块菌):

在年,我看到了一个来回切换网络和错误自我纠正的建议

”\_(ツ)_/“

在中,我看到一个建议,建议来回切换网络,并进行错误自纠正

”\_(ツ)_/“

  MyContract.deployed().then((instance) => {
      instance.myMethod (id, price, {from: account}).then (...)