Add TxSel Nonce sort. Fix surplus from refactors

- Add TxSel Nonce sort
- Fix surplus from refactors
- StateDB reuse computation of ToIdx across Synchronizer, TxSelector,
BatchBuilder
This commit is contained in:
arnaucube
2020-10-14 10:44:09 +02:00
parent c6d71a48af
commit 1a2f769b5d
7 changed files with 60 additions and 59 deletions

View File

@@ -116,12 +116,12 @@ func (tx *L1Tx) CalcTxID() (*TxID, error) {
}
// Tx returns a *Tx from the L1Tx
func (tx *L1Tx) Tx() *Tx {
func (tx L1Tx) Tx() Tx {
f := new(big.Float).SetInt(tx.Amount)
amountFloat, _ := f.Float64()
userOrigin := new(bool)
*userOrigin = tx.UserOrigin
genericTx := &Tx{
genericTx := Tx{
IsL1: true,
TxID: tx.TxID,
Type: tx.Type,