예제 #1
0
func TestFiles(t *testing.T) {
	err := kaiju.Init()
	if err != nil {
		t.Errorf(fmt.Sprintf("Failed to call kaiju.Init: %s", err))
	}

	fs, err := newFiles(headersFileName, kdbFileName)
	if err != nil {
		t.Errorf(fmt.Sprintf("newFiles error: %s", err))
	}
	//fs.headerFile().Write([]byte{0,1,2,3,4,5,6,78})
	fs.close()
}
예제 #2
0
func TestOutputDB(t *testing.T) {
	err := kaiju.Init()
	if err != nil {
		t.Errorf(fmt.Sprintf("Failed to call kaiju.Init: %s", err))
	}

	fs, err := newFiles(headersFileName, kdbFileName)
	if err != nil {
		t.Errorf(fmt.Sprintf("newFiles error: %s", err))
	}

	_, err = newOutputDB(fs.kdbFile())
	if err != nil {
		t.Errorf(fmt.Sprintf("newUtxoDB error: %s", err))
	}

	fs.close()
}