Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ethereum geth sendTransaction错误:用于天然气价格的资金不足+;价值_Ethereum_Go Ethereum - Fatal编程技术网

Ethereum geth sendTransaction错误:用于天然气价格的资金不足+;价值

Ethereum geth sendTransaction错误:用于天然气价格的资金不足+;价值,ethereum,go-ethereum,Ethereum,Go Ethereum,我在一个私人网络中尝试geth,当我尝试sendTransaction时,失败的原因是“错误:用于天然气的资金不足*价格+价值” 但账户余额[0]为4785,似乎足够了 web3.fromWei(eth.getBalance(eth.accounts[0]), "ether") 4785 我试过的命令是 eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei(1, "ether"),

我在一个私人网络中尝试geth,当我尝试sendTransaction时,失败的原因是“错误:用于天然气的资金不足*价格+价值”

但账户余额[0]为4785,似乎足够了

web3.fromWei(eth.getBalance(eth.accounts[0]), "ether")
4785
我试过的命令是

eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei(1, "ether"), gas: 1})
genesis json文件是

{
  "config": {
        "chainId": 0,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    },
  "alloc"      : {},
  "coinbase"   : "0x0000000000000000000000000000000000000000",
  "difficulty" : "0x20000",
  "extraData"  : "",
  "gasLimit"   : "0x2fefd8",
  "nonce"      : "0x0000000000000042",
  "mixhash"    : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp"  : "0x00"
}
geth版本:1.7.1


有人知道出了什么问题吗?

我自己解决了这个问题。原因是chainId为0。当我设置CHAINID8888时,它工作得很好