return txs
}
+func (m *mempool) IsDust(tx *types.Tx) bool {
+ return false
+}
+
func TestSyncMempool(t *testing.T) {
tmpDir, err := ioutil.TempDir(".", "")
if err != nil {
startPoint.Hash = cfg.GenesisBlock().Hash()
}
if err := movCore.InitChainStatus(startPoint.Height, &startPoint.Hash); err != nil {
- log.Fatalf("Failed to create Mov protocol", err.Error())
+ log.Fatalf("Failed to create Mov protocol:%v", err.Error())
}
// Get store
if config.DBBackend != "memdb" && config.DBBackend != "leveldb" {
dispatcher := event.NewDispatcher()
store := database.NewStore(testDB)
accountStore := database.NewAccountStore(testDB)
- txPool := protocol.NewTxPool(store, dispatcher)
+ txPool := protocol.NewTxPool(store, nil, dispatcher)
config.CommonConfig = config.DefaultConfig()
- chain, err := protocol.NewChain(store, txPool, dispatcher)
+ chain, err := protocol.NewChain(store, txPool, nil, dispatcher)
if err != nil {
t.Fatal(err)
}
config.CommonConfig = config.DefaultConfig()
store := database.NewStore(testDB)
dispatcher := event.NewDispatcher()
- txPool := protocol.NewTxPool(store, dispatcher)
- chain, err := protocol.NewChain(store, txPool, dispatcher)
+ txPool := protocol.NewTxPool(store, nil, dispatcher)
+ chain, err := protocol.NewChain(store, txPool, nil, dispatcher)
if err != nil {
return nil, nil, nil, err
}
}
}
- block, err := proposal.NewBlockTemplate(chain, txPool, nil, uint64(time.Now().UnixNano()/1e6))
+ block, err := proposal.NewBlockTemplate(chain, txPool, nil, nil, uint64(time.Now().UnixNano()/1e6))
if err != nil {
return err
}
func (m *Mempool) GetTransactions() []*protocol.TxDesc {
return m.txs
}
+
+func (m *Mempool) IsDust(tx *types.Tx) bool {
+ return false
+}
b.ResetTimer()
for i := 0; i < b.N; i++ {
- proposal.NewBlockTemplate(chain, txPool, accountManager, uint64(time.Now().UnixNano()/1e6))
+ proposal.NewBlockTemplate(chain, txPool, accountManager, nil, uint64(time.Now().UnixNano()/1e6))
}
}
config.CommonConfig = config.DefaultConfig()
store := database.NewStore(testDB)
dispatcher := event.NewDispatcher()
- txPool := protocol.NewTxPool(store, dispatcher)
- chain, err := protocol.NewChain(store, txPool, dispatcher)
+ txPool := protocol.NewTxPool(store, nil, dispatcher)
+ chain, err := protocol.NewChain(store, txPool, nil, dispatcher)
return chain, store, txPool, err
}
store := database.NewStore(testDB)
walletStore := database.NewWalletStore(testDB)
dispatcher := event.NewDispatcher()
- txPool := protocol.NewTxPool(store, dispatcher)
+ txPool := protocol.NewTxPool(store, nil, dispatcher)
- chain, err := protocol.NewChain(store, txPool, dispatcher)
+ chain, err := protocol.NewChain(store, txPool, nil, dispatcher)
if err != nil {
t.Fatal(err)
}
store := database.NewStore(testDB)
dispatcher := event.NewDispatcher()
- txPool := protocol.NewTxPool(store, dispatcher)
- chain, err := protocol.NewChain(store, txPool, dispatcher)
+ txPool := protocol.NewTxPool(store, nil, dispatcher)
+ chain, err := protocol.NewChain(store, txPool, nil, dispatcher)
if err != nil {
t.Fatal(err)
}
store := database.NewStore(testDB)
dispatcher := event.NewDispatcher()
- txPool := protocol.NewTxPool(store, dispatcher)
+ txPool := protocol.NewTxPool(store, nil, dispatcher)
- chain, err := protocol.NewChain(store, txPool, dispatcher)
+ chain, err := protocol.NewChain(store, txPool, nil, dispatcher)
if err != nil {
t.Fatal(err)
}