|
客户端编译运行 如果您遇到构建失败,请尝试从libra目录中删除cargo.lock文件: 如果您的客户端没有连接到testnet: - 检查网络连接。
- 确保您使用的是最新版本的客户端。 拉取最新的Libra Core并重新运行客户端:
- ./scripts/cli/start_cli_testnet.sh
铸币添加到账户如果您在testnet上连接的验证程序节点不可用,您将收到“服务器不可用”消息,如下所示: libra% account mint 0 110>> Minting coins[ERROR] Error minting coins: Server unavailable, please retry and/or check **if** host passed to the client is running[size=13.3333px]COPY
如果您在提交交易后未更新余额,请稍等片刻再次查询余额。 如果区块链上大量交易在提交,那么可能会有延迟。 如果您的余额仍未更新,请再次尝试铸币。 要检查帐户是否存在,请查询帐户状态。 对于索引为0的帐户,请输入以下内容: libra% query account_state 0
转账命令如果testnet验证器节点不可用(而客户端已确定连接上了)或与 testnet 网络的连接超时,您将看到此错误: libra% transfer 0 1 10>> Transferring[ERROR] Failed to perform transaction: Server unavailable, please retry and/or check if host passed to the client is running[size=13.3333px]COPY
解决交易故障: - 检查testnet的连接。
- 查询发件人帐户以确保其确实存在。 对索引为0的帐户使用以下命令:
- 使用quit 或 q!退出, 然后重新运行以下命令以连接到testnet:
- 从libre目录运行 ./scripts/cli/start_cli_testnet.sh
查询命令输出示例通过账号和序号查询交易此示例将使用帐户和序列号查询单个交易的详细信息。 libra% query txn_acc_seq 0 0 true>> Getting committed transaction by account and sequence numberCommitted transaction: SignedTransaction { { raw_txn: RawTransaction { sender: 3ed8e5fafae4147b2a105a0be2f81972883441cfaaadf93fc0868e7a0253c4a8, sequence_number: 0, payload: {, transaction: peer_to_peer_transaction, args: [ {ADDRESS: 8337aac709a41fe6be03cad8878a0d4209740b1608f8a81566c9a7d4b95a2ec7}, {U64: 10000000}, ] }, max_gas_amount: 10000, gas_unit_price: 0, expiration_time: 1560466424s,}, public_key: 55af3fe3f28550a2f1e5ebf073ef193feda44344d94c463b48be202aa0b3255d, signature: Signature( R: CompressedEdwardsY: [210, 23, 214, 62, 228, 179, 64, 147, 81, 159, 180, 138, 100, 211, 111, 139, 178, 148, 81, 1, 240, 135, 148, 145, 104, 234, 227, 239, 198, 153, 13, 199], s: Scalar{ bytes: [203, 76, 105, 49, 64, 130, 162, 81, 22, 237, 159, 26, 80, 181, 111, 94, 84, 6, 152, 126, 181, 192, 62, 103, 130, 94, 246, 174, 139, 214, 3, 15],} ), } }Events:ContractEvent { access_path: AccessPath { address: 3ed8e5fafae4147b2a105a0be2f81972883441cfaaadf93fc0868e7a0253c4a8, type: Resource, hash: "217da6c6b3e19f1825cfb2676daecce3bf3de03cf26647c78df00b371b25cc97", suffix: "/sent_events_count/" } , index: 0, event_data: AccountEvent { account: 8337aac709a41fe6be03cad8878a0d4209740b1608f8a81566c9a7d4b95a2ec7, amount: 10000000 } }ContractEvent { access_path: AccessPath { address: 8337aac709a41fe6be03cad8878a0d4209740b1608f8a81566c9a7d4b95a2ec7, type: Resource, hash: "217da6c6b3e19f1825cfb2676daecce3bf3de03cf26647c78df00b371b25cc97", suffix: "/received_events_count/" } , index: 0, event_data: AccountEvent { account: 3ed8e5fafae4147b2a105a0be2f81972883441cfaaadf93fc0868e7a0253c4a8, amount: 10000000 } }[size=13.3333px]COPY
请注意,交易金额以 microlibra 单位显示.
|
|