github.com/chain5j/chain5j-pkg@v1.0.7/collection/lookup/config.go (about)

     1  // Package lookup
     2  //
     3  // @author: xwc1125
     4  package lookup
     5  
     6  import "time"
     7  
     8  type PoolConfig struct {
     9  	MaxTxSize uint64 // Max size of tx pool
    10  	// PriceBump     int    // Price bump to decide whether to replace tx or not
    11  	// BatchTimeout  time.Duration
    12  	// BatchCapacity int
    13  
    14  	TxLifeTime time.Duration // 分钟
    15  	TxTaskTime time.Duration // 刷新时间(秒)
    16  }
    17  
    18  func DefaultConfig() *PoolConfig {
    19  	return &PoolConfig{
    20  		MaxTxSize: 4096,
    21  		// PriceBump:     10,
    22  		// BatchTimeout:  10000 * time.Millisecond,
    23  		// BatchCapacity: 1000,
    24  		TxLifeTime: 1,
    25  		TxTaskTime: 10,
    26  	}
    27  }