don't load everything on start

This commit is contained in:
alex.sharov 2021-08-26 18:08:03 +07:00
parent 66f4f6880f
commit 1d9c9aa1bf

View File

@ -1015,10 +1015,9 @@ func (p *TxPool) fromDB(ctx context.Context, tx kv.RwTx, coreTx kv.Tx, senders *
_, err := parseCtx.ParseTransaction(v[8+8:], 0, txs.txs[i], nil)
if err != nil {
panic(err)
return fmt.Errorf("err: %w, rlp: %x\n", err, v[8+8:])
}
txs.txs[i].rlp = nil
txs.txs[i].rlp = nil // means that we don't need store it in db anymore
txs.txs[i].senderID = binary.BigEndian.Uint64(v)
senderAddr, err := tx.GetOne(kv.PooledSenderIDToAdress, v[:8])