Skip to content

Commit

Permalink
test and lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dusannosovic-ethernal committed Feb 13, 2024
1 parent 7e2c271 commit cd3e77e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
12 changes: 6 additions & 6 deletions jsonrpc/txpool_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ func TestContentEndpoint(t *testing.T) {
assert.NotNil(t, txData)
assert.Equal(t, testTx1.Gas(), uint64(txData.Gas))
assert.Equal(t, *(testTx1.GasPrice()), big.Int(*txData.GasPrice))
assert.Equal(t, *(testTx1.GasFeeCap()), big.Int(*txData.GasFeeCap))
assert.Equal(t, *(testTx1.GasTipCap()), big.Int(*txData.GasTipCap))
assert.Equal(t, *(testTx1.GasFeeCap()), big.Int(*txData.GasPrice))
assert.Equal(t, *(testTx1.GasTipCap()), big.Int(*txData.GasPrice))
assert.Equal(t, testTx1.To(), txData.To)
assert.Equal(t, testTx1.From(), txData.From)
assert.Equal(t, *(testTx1.Value()), big.Int(txData.Value))
Expand All @@ -62,7 +62,7 @@ func TestContentEndpoint(t *testing.T) {
assert.NotNil(t, txData)
assert.Equal(t, (argUint64)(types.DynamicFeeTxType), txData.Type)
assert.Equal(t, testTx2.Gas(), uint64(txData.Gas))
assert.Equal(t, (*testTx2.GasPrice()), big.Int(*txData.GasPrice))
assert.Equal(t, (*testTx2.GasPrice()), big.Int(*txData.GasFeeCap))
assert.Equal(t, *(testTx2.GasFeeCap()), big.Int(*txData.GasFeeCap))
assert.Equal(t, *(testTx2.GasTipCap()), big.Int(*txData.GasTipCap))
assert.Equal(t, testTx2.To(), txData.To)
Expand Down Expand Up @@ -98,8 +98,8 @@ func TestContentEndpoint(t *testing.T) {
assert.NotNil(t, txData)
assert.Equal(t, testTx1.Gas(), uint64(txData.Gas))
assert.Equal(t, *(testTx1.GasPrice()), big.Int(*txData.GasPrice))
assert.Equal(t, *(testTx1.GasFeeCap()), big.Int(*txData.GasFeeCap))
assert.Equal(t, *(testTx1.GasTipCap()), big.Int(*txData.GasTipCap))
assert.Equal(t, *(testTx1.GasFeeCap()), big.Int(*txData.GasPrice))
assert.Equal(t, *(testTx1.GasTipCap()), big.Int(*txData.GasPrice))
assert.Equal(t, testTx1.To(), txData.To)
assert.Equal(t, testTx1.From(), txData.From)
assert.Equal(t, *(testTx1.Value()), big.Int(txData.Value))
Expand All @@ -111,7 +111,7 @@ func TestContentEndpoint(t *testing.T) {
assert.NotNil(t, txData)
assert.Equal(t, (argUint64)(types.DynamicFeeTxType), txData.Type)
assert.Equal(t, testTx2.Gas(), uint64(txData.Gas))
assert.Equal(t, *(testTx2.GasPrice()), big.Int(*txData.GasPrice))
assert.Equal(t, *(testTx2.GasPrice()), big.Int(*txData.GasFeeCap))
assert.Equal(t, *(testTx2.GasFeeCap()), big.Int(*txData.GasFeeCap))
assert.Equal(t, *(testTx2.GasTipCap()), big.Int(*txData.GasTipCap))
assert.Equal(t, testTx2.To(), txData.To)
Expand Down
5 changes: 4 additions & 1 deletion types/access_list_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func (al TxAccessList) marshallRLPWith(arena *fastrlp.Arena) *fastrlp.Value {
accessTupleVV.Set(storageKeysVV)
accessListVV.Set(accessTupleVV)
}

return accessListVV
}

Expand Down Expand Up @@ -291,7 +292,9 @@ func (tx *AccessListTxn) unmarshalRLPFrom(p *fastrlp.Parser, v *fastrlp.Value) e
txAccessList = make(TxAccessList, len(accessListVV))
}

txAccessList.unmarshallRLPFrom(p, accessListVV)
if err = txAccessList.unmarshallRLPFrom(p, accessListVV); err != nil {
return err
}

tx.setAccessList(txAccessList)

Expand Down
4 changes: 3 additions & 1 deletion types/dynamic_fee_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ func (tx *DynamicFeeTx) unmarshalRLPFrom(p *fastrlp.Parser, v *fastrlp.Value) er
txAccessList = make(TxAccessList, len(accessListVV))
}

txAccessList.unmarshallRLPFrom(p, accessListVV)
if err = txAccessList.unmarshallRLPFrom(p, accessListVV); err != nil {
return err
}

tx.setAccessList(txAccessList)

Expand Down

0 comments on commit cd3e77e

Please sign in to comment.