简体   繁体   English

以太坊待交易

[英]Ethereum Pending Transaction

I am trying to send a transaction. 我正在尝试发送交易。

eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei(5, "ether")})

eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei(5, "ether")})

INFO [08-25|21:14:21] Submitted transaction INFO [08-25 | 21:14:21]提交的交易
fullhash=0xe1b58ddcb6d8c3f3a8308e0eb275f10c0c3b7bd8807cd24ff6a315a3917ab2a5 recipient=0x939f34bc9253a62927871c889bcf62f398d264a6 INFO [08-25|21:14:29] Submitted transaction fullhash = 0xe1b58ddcb6d8c3f3a8308e0eb275f10c0c3b7bd8807cd24ff6a315a3917ab2a5收件人= 0x939f34bc9253a62927871c889bcf62f398d264a6信息[08-25 | 21:14:29]提交的交易
fullhash=0x33ca6bb00a70de13bd8b1fdec5d0a7995ad09a90e416ac8ab686fc650a324331 recipient=0x939f34bc9253a62927871c889bcf62f398d264a6 INFO [08-25|21:14:57] Updated mining threads threads=1 INFO [08-25|21:14:57] Transaction pool price threshold updated price=18000000000 INFO [08-25|21:14:57] Starting mining operation INFO [08-25|21:14:57] Commit new mining work fullhash = 0x33ca6bb00a70de13bd8b1fdec5d0a7995ad09a90e416ac8ab686fc650a324331收件人= 0x939f34bc9253a62927871c889bcf62f398d264a6 INFO [08-25 | 21:14:57]更新的挖矿线程= 1 INFO阈值[08-25 | 8000:21:14:57] 21:14:57]开始采矿作业INFO [08-25 | 21:14:57]进行新的采矿工作
number=1 txs=2 uncles=0 elapsed=73.574ms number = 1 txs = 2叔叔= 0已逝= 73.574ms

But when i run 但是当我跑步时

eth.pendingTransactions

i am able to see the list of above sent transactions SO my question is When will the transactions be mined? 我能够看到上述已发送交易的列表,所以我的问题是何时会开采交易?

PS- i am running it on my local machine(private blockchain) PS-我正在本地计算机上运行它(私有区块链)

Thanks in advance :) 提前致谢 :)

If you are using private blockchain then you can run miner.start() function using the console. 如果使用私有miner.start()链,则可以使用控制台运行miner.start()函数。 After that it will take 5-6 min and miner will be ready to pick your transaction and automatically coinbase account balance will be increased. 之后,将需要5-6分钟,矿工将准备接您的交易,自动增加的coinbase帐户余额。

Some time if you send very less gas and gasprice with your transaction with your transaction then may be transaction gets stuck. 有时,如果您随交易发送的汽油和汽油价格少得多,则可能是交易卡住了。 So please send enough gas with your transaction. 因此,请在您的交易中发送足够的汽油。 It will get executed. 它将被执行。

You can also send gas and gasprice in your command as below-- 您还可以按照以下命令发送汽油和汽油价格-

eth.sendTransaction({from: eth.coinbase, to: "0x154230ed91d1e711e56b9c0f88b5ba5fd2bghjgf", value: web3.toWei(5, "ether"),gas:21000,gasPrice:web3.toWei(45,"wei")})

Hope this will help 希望这会有所帮助

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

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