github.com/ethereumproject/go-ethereum@v5.5.2+incompatible/accounts/manager_test_data_test.go (about)

     1  package accounts
     2  
     3  import (
     4  	"fmt"
     5  	"io/ioutil"
     6  	"math/rand"
     7  	"os"
     8  	"testing"
     9  	"time"
    10  )
    11  
    12  var testSigData = make([]byte, 32)
    13  
    14  func tmpManager(t *testing.T) (string, *Manager) {
    15  	rand.Seed(time.Now().UnixNano())
    16  	dir, err := ioutil.TempDir("", fmt.Sprintf("eth-manager-mem-test-%d-%d", os.Getpid(), rand.Int()))
    17  	if err != nil {
    18  		t.Fatal(err)
    19  	}
    20  
    21  	m, err := NewManager(dir, veryLightScryptN, veryLightScryptP, false)
    22  	if err != nil {
    23  		t.Fatal(err)
    24  	}
    25  	return dir, m
    26  }