Merge branch 'master' of github.com:harmony-one/harmony

pull/166/head
Minh Doan 6 years ago
commit da6134a442
  1. 7
      client/wallet/main.go

@ -287,7 +287,7 @@ func SubmitTransaction(tx *types.Transaction, walletNode *node.Node, shardID uin
msg := proto_node.ConstructTransactionListMessageAccount(types.Transactions{tx}) msg := proto_node.ConstructTransactionListMessageAccount(types.Transactions{tx})
leader := (*walletNode.Client.Leaders)[shardID] leader := (*walletNode.Client.Leaders)[shardID]
walletNode.SendMessage(leader, msg) walletNode.SendMessage(leader, msg)
fmt.Printf("Transaction Id for shard %d: %s\n", int(shardID), common.BytesToAddress(tx.Hash().Bytes()).Hex()) fmt.Printf("Transaction Id for shard %d: %s\n", int(shardID), tx.Hash().Hex())
time.Sleep(300 * time.Millisecond) time.Sleep(300 * time.Millisecond)
return nil return nil
} }
@ -313,7 +313,10 @@ func GetFreeToken(address common.Address, walletNode *node.Node) {
port, _ := strconv.Atoi(leader.Port) port, _ := strconv.Atoi(leader.Port)
client := client2.NewClient(leader.IP, strconv.Itoa(port+node.ClientServicePortDiff)) client := client2.NewClient(leader.IP, strconv.Itoa(port+node.ClientServicePortDiff))
response := client.GetFreeToken(address) response := client.GetFreeToken(address)
fmt.Printf("Transaction Id requesting free token in shard %d: %s\n", int(shardID), common.BytesToAddress(response.TxId).Hex())
txId := common.Hash{}
txId.SetBytes(response.TxId)
fmt.Printf("Transaction Id requesting free token in shard %d: %s\n", int(shardID), txId.Hex())
} }
} }

Loading…
Cancel
Save