mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-08 03:51:20 +00:00
27 lines
563 B
Go
27 lines
563 B
Go
|
package torrent
|
||
|
|
||
|
import (
|
||
|
"github.com/ledgerwatch/turbo-geth/ethdb"
|
||
|
"github.com/ledgerwatch/turbo-geth/log"
|
||
|
"os"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestTorrentAddTorrent(t *testing.T) {
|
||
|
t.Skip()
|
||
|
log.Root().SetHandler(log.LvlFilterHandler(log.LvlInfo, log.StreamHandler(os.Stderr, log.TerminalFormat(true))))
|
||
|
path := os.TempDir() + "/trnt_test3"
|
||
|
os.RemoveAll(path)
|
||
|
|
||
|
kv := ethdb.NewLMDB().Path(path + "/lmdb").MustOpen()
|
||
|
db := ethdb.NewObjectDatabase(kv)
|
||
|
|
||
|
cli := New(path, SnapshotMode{
|
||
|
Headers: true,
|
||
|
}, true)
|
||
|
err := cli.Run(db)
|
||
|
if err != nil {
|
||
|
t.Fatal(err)
|
||
|
}
|
||
|
}
|