Ethereum TestRPC是否在事务上报告错误?

Ethereum TestRPC是否在事务上报告错误?,ethereum,truffle,Ethereum,Truffle,我从一个x.send(1)返回一个事务,其JSON类似于上面的代码。我可以在输入属性的值中看到“7fa543843e2f5766ad623b2155d639d736358244”与我为x提供的帐户地址匹配。Solidity代码段是: { hash: '0xcc871efa64631ff57b6c4cdf9e9c52dce299956cc0bc2cdf6781dbd647a80926', nonce: 34, blockHash: '0xf4e21dabc0d6f99ae9a3fd128b

我从一个x.send(1)返回一个事务,其JSON类似于上面的代码。我可以在输入属性的值中看到“7fa543843e2f5766ad623b2155d639d736358244”与我为x提供的帐户地址匹配。Solidity代码段是:

{ hash: '0xcc871efa64631ff57b6c4cdf9e9c52dce299956cc0bc2cdf6781dbd647a80926',
  nonce: 34,
  blockHash: '0xf4e21dabc0d6f99ae9a3fd128b9f25462110ed0e2811c0d5f91ffce9ac85594a',
  blockNumber: 49,
  transactionIndex: 0,
  from: '0x9c3fe8bc6d259d44e80fb728e74727bfbe58e988',
  to: '0xb22ab8533936d6d75c1ecf229c1ad68410ea8ee3',
  value: { [String: '0'] s: 1, e: 0, c: [ 0 ] },
  gas: 3141592,
  gasPrice: { [String: '1'] s: 1, e: 0, c: [ 1 ] },
  input: '0x1f5c1d9800000000000000000000000000000000000000000000000000000000000000400000000000000000000000007fa543843e2f5766ad623b2155d639d73635824400000000000000000000000000000000000000000000000000000000000000134f70656e20412042616e6b204163636f756e7400000000000000000000000000’ }
但是,JSON中的to:属性是错误的。我的环境正在对TestRPC使用在Truffle中运行的测试。是否有人认为这是一个已知的问题或我的问题

我的测试代码的适当部分是:

function do(string _description, address x) {
   if ( msg.sender != owner )
       throw;
   description = _description;

    x.send(1);
 }

这种行为实际上与以太坊的工作原理是一致的。当测试调用时:

 .then(
    function (_bool0) {
        assert.isTrue(_bool0,"whoops");
        return contract.do("a test", accounts[4], {from: accounts[0]} );
    }).then(
    function (tx_id) {
        var transaction = web3.eth.getTransaction(tx_id);
        /* debugging my test */
        console.log(transaction);

        assert.strictEqual(transaction.to,accounts[4],"transaction \"to:\" was not provided address");

        done();
    }
).catch(done);
它导致记录在区块链上的交易。从帐户[0]帐户到合同的交易:这也是一种帐户类型。返回到我的测试的对象表示这个事务:如上面的JSON所示

我错误地认为返回的对象代表了合同与第二个帐户之间的交易


为了实现我的测试目标,我需要检查第二个帐户是否存在交易。一旦我弄明白了,我会更新它。

我认为这是一个与合同相关的tx\u id问题,而不是我所做的x.send()问题。我需要send()的事务id。如果您觉得您的问题在stackoverflow上没有得到足够的重视,您也可以尝试在新的服务器上询问以太坊特定的问题。
contract.do("a test", accounts[4], {from: accounts[0]} );