// the number of restored Tx should be very small or most of time ZERO
// Error returned from validation is ignored, tx could still be lost if validation fails.
// TODO: adjust tx timestamp so that it won't starve in pool.
- if _, err := c.ValidateTx(tx); err != nil {
+ if _, err := c.validateTx(tx); err != nil {
log.WithFields(log.Fields{"module": logModule, "tx_id": tx.Tx.ID.String(), "error": err}).Info("restore tx fail")
}
}
return c.orphanManage.BlockExist(&blockHash), nil
}
+ c.markTransactions(block.Transactions...)
+
if _, err := c.store.GetBlockHeader(&block.PreviousBlockHash); err != nil {
c.orphanManage.Add(block)
return true, nil