mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 19:36:44 +01:00
Add abstraction method of processTxs to StateDB
- Update GHA lint.yml increasing timeout time to avoid GHA Lint errors
- Update common.BatchNum & common.Idx & common.Nonce usage in StateDB
- Add abstraction method of processTxs to StateDB
- Which will be used by Synchronizer & BatchBuilder
This commit is contained in:
@@ -16,8 +16,7 @@ func TestNonceParser(t *testing.T) {
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, 5, len(nBytes))
|
||||
assert.Equal(t, "0100000000", hex.EncodeToString(nBytes[:]))
|
||||
n2, err := NonceFromBytes(nBytes)
|
||||
assert.Nil(t, err)
|
||||
n2 := NonceFromBytes(nBytes)
|
||||
assert.Equal(t, n, n2)
|
||||
|
||||
// value before overflow
|
||||
@@ -26,8 +25,7 @@ func TestNonceParser(t *testing.T) {
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, 5, len(nBytes))
|
||||
assert.Equal(t, "ffffffffff", hex.EncodeToString(nBytes[:]))
|
||||
n2, err = NonceFromBytes(nBytes)
|
||||
assert.Nil(t, err)
|
||||
n2 = NonceFromBytes(nBytes)
|
||||
assert.Equal(t, n, n2)
|
||||
|
||||
// expect value overflow
|
||||
@@ -35,8 +33,6 @@ func TestNonceParser(t *testing.T) {
|
||||
nBytes, err = n.Bytes()
|
||||
assert.NotNil(t, err)
|
||||
assert.Equal(t, ErrNonceOverflow, err)
|
||||
_, err = NonceFromBytes(nBytes)
|
||||
assert.Nil(t, err)
|
||||
}
|
||||
|
||||
func TestTxCompressedData(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user