github.com/turingchain2020/turingchain@v1.1.21/system/mempool/timeline/timeline_test.go (about) 1 // Copyright Turing Corp. 2018 All Rights Reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package timeline 6 7 import ( 8 "encoding/json" 9 "testing" 10 11 "github.com/turingchain2020/turingchain/system/mempool" 12 "github.com/turingchain2020/turingchain/types" 13 ) 14 15 func TestNewMempool(t *testing.T) { 16 sub, _ := json.Marshal(&mempool.SubConfig{PoolCacheSize: 2}) 17 module := New(&types.Mempool{}, sub) 18 mem := module.(*mempool.Mempool) 19 mem.Close() 20 }