(txHeightRange int64)
| 52 | } |
| 53 | |
| 54 | func initTxHashCache(txHeightRange int64) (*txHashCache, *BlockChain, *types.Chain33Config) { |
| 55 | cfg := types.NewChain33Config(types.GetDefaultCfgstring()) |
| 56 | cfg.GetModuleConfig().BlockChain.DefCacheSize = txHeightRange * 4 |
| 57 | chain := New(cfg) |
| 58 | chain.blockStore = &BlockStore{blockCache: chain.blockCache} |
| 59 | q := queue.New("channel") |
| 60 | q.SetConfig(cfg) |
| 61 | chain.client = q.Client() |
| 62 | cache := newTxHashCache(chain, txHeightRange, txHeightRange) |
| 63 | chain.txHeightCache = cache |
| 64 | return cache, chain, cfg |
| 65 | |
| 66 | } |
| 67 | |
| 68 | func newTestTxs(cfg *types.Chain33Config, priv crypto.PrivKey, currHeight, txHeightRange int64) []*types.Transaction { |
| 69 |
no test coverage detected