In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to use Ethereum-related commands". Friends who are interested may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use Ethereum-related commands.
1. If a mapping (uint= > ConfirmDetail) confirmDetails is defined in struct ConfirmOrder, confirmDetails may not be assigned a value when creating ConfirmOrder. If you use ConfirmDetail [] confirmDetails and do not assign a value when creating a ConfirmOrder, an error will be reported: TypeError: Wrong argument count for struct constructor: 5 arguments given but expected 6.
Second, function AddConfirmDetails (uint _ orderId,string _ state) public view returns (uint amount) {, this writing does not show this method. Function AddConfirmDetails (uint _ orderId,string _ state) public {, so write to show this method.
3. Public view returns. If you add view, you cannot insert it. You can insert it without adding view, but you cannot return a value.
4. Query geth version
$geth version
Geth
Version: 1.8.3-stable
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.10.1
Operating System: darwin
GOPATH=
GOROOT=/usr/local/opt/go/libexec
5. Query go version
$go version
Go version go1.10.1 darwin/amd64
VI. Block chain command
Txpool.status
Miner.start (1); admin.sleepBlocks (5); miner.stop ()
Eth.getBlock (33)
Web3.fromWei (eth.getBalance (eth.accounts [0]), 'ether')
Admin.peers
$geth--testnet-- fast console 2 > > geth-test.log Test Network
$geth--fast console 2 > > geth-test.log main network
Eth.syncing query synchronization progress
Encountered a problem: synchronisation failed retrying block download canceled continues to execute the above statement to synchronize the node after using the following two sentences
$geth removedb
$geth upgradedb
7. The start-up command of multi-node private chain must be consistent, otherwise one node submits the block, and other nodes cannot dig the mine to deal with this block.
such as
Geth-- identity "itari"-- datadir data0-- networkid 899-- port 30303-- rpc-- rpcaddr localhost-- rpcport 8545-- rpcapi "db,web3,eth,personal,miner,net,txpool"-- rpccorsdomain "*" console 2 > > data.log
And
$geth-identity "itari"-datadir data0-networkid 899-port 30303-rpc-rpcaddr localhost-rpcport 8545 console
Two different startup modes
At this point, I believe you have a deeper understanding of "how to use Ethereum-related commands". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.