Ethereum geth sendTransaction错误:用于天然气价格的资金不足+;价值
我在一个私人网络中尝试geth,当我尝试sendTransaction时,失败的原因是“错误:用于天然气的资金不足*价格+价值” 但账户余额[0]为4785,似乎足够了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"),
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时,它工作得很好