Skip to content
Snippets Groups Projects
Commit 421bfc14 authored by Xavier Perret's avatar Xavier Perret
Browse files

simplification of id

parent 36be3773
Branches
No related tags found
1 merge request!2added file to separate client function from the server
...@@ -2,23 +2,19 @@ package command_line ...@@ -2,23 +2,19 @@ package command_line
import ( import (
"fmt" "fmt"
"math/rand"
ObjectStorageAPI "node/object-storage" ObjectStorageAPI "node/object-storage"
Sender "node/sender" Sender "node/sender"
. "node/types" . "node/types"
"node/utilities" "node/utilities"
"os" "os"
"strconv" "strconv"
"time"
) )
// userCreatedTransaction is a function to interactively create a transaction using the terminal // userCreatedTransaction is a function to interactively create a transaction using the terminal
func userCreatedTransaction(config Config) Transaction { func userCreatedTransaction(config Config) Transaction {
fmt.Println("--------------------STARTING USER CREATED TRANSACTION--------------------") fmt.Println("--------------------STARTING USER CREATED TRANSACTION--------------------")
var trans Transaction var trans Transaction
now := time.Now().String() trans.Id = utilities.RandomString()
randomString := strconv.Itoa(rand.Int())
trans.Id = now + randomString
fmt.Println() fmt.Println()
var receiver string var receiver string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment