简体   繁体   English

以太坊交易:为什么交易后余额不会改变?

[英]Ethereum Transaction: why balance does not change after transaction?

I set up Ethereum private chain, opened two accounts, mined some ethers in the first one. 我建立了以太坊私人连锁店,开了两个帐户,在第一个开采了一些醚。 However, when I tried to send 1 ether from one account to the other, the balance did not change. 但是,当我尝试从一个帐户向另一个帐户发送1个以太币时,余额没有变化。 The snapshot is as following. 快照如下。 Transaction does not change balances Any one has a clue to solve this problem? 交易不会改变余额任何人都有解决这个问题的线索吗?

Don't stop the miner. 不要阻止矿工。 Transactions will only be credited to the accounts (ie, the state will only be changed) if a transaction is included in the block. 只有在块中包含交易时,交易才会记入账户(即,只会更改状态 )。

So if you run a private network for testing purposes, keep always a miner running. 因此,如果您运行专用网络进行测试,请始终保持矿工运行。 One mining node with a single miner thread is sufficient: 一个具有单个矿工线程的挖掘节点就足够了:

geth --mine --minerthreads=1 [your custom options]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM