forked from 0xPolygonHermez/zkevm-node
-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add innertx cache db * add pool * add duration of insert * add jsonb * add tx * add mock pool xlayer * add log * add log * add switch * add log * add metrics * add comment * insert db * add metrics add error count * add metircs
- Loading branch information
Showing
10 changed files
with
186 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package mocks | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/ethereum/go-ethereum/common" | ||
) | ||
|
||
// AddInnerTx provides a mock function with given fields: ctx, txHash, innerTx | ||
func (_m *PoolMock) AddInnerTx(ctx context.Context, txHash common.Hash, innerTx []byte) error { | ||
ret := _m.Called(ctx, txHash, innerTx) | ||
|
||
if len(ret) == 0 { | ||
panic("no return value specified for AddTx") | ||
} | ||
|
||
var r0 error | ||
if rf, ok := ret.Get(0).(func(context.Context, common.Hash, []byte) error); ok { | ||
r0 = rf(ctx, txHash, innerTx) | ||
} else { | ||
r0 = ret.Error(0) | ||
} | ||
|
||
return r0 | ||
} | ||
|
||
// GetInnerTx provides a mock function with given fields: ctx, txHash | ||
func (_m *PoolMock) GetInnerTx(ctx context.Context, txHash common.Hash) (string, error) { | ||
ret := _m.Called(ctx, txHash) | ||
|
||
if len(ret) == 0 { | ||
panic("no return value specified for GetPendingTxs") | ||
} | ||
|
||
var r0 string | ||
var r1 error | ||
if rf, ok := ret.Get(0).(func(context.Context, common.Hash) (string, error)); ok { | ||
return rf(ctx, txHash) | ||
} | ||
if rf, ok := ret.Get(0).(func(context.Context, common.Hash) string); ok { | ||
r0 = rf(ctx, txHash) | ||
} else { | ||
if ret.Get(0) != nil { | ||
r0 = ret.Get(0).(string) | ||
} | ||
} | ||
|
||
if rf, ok := ret.Get(1).(func(context.Context, common.Hash) error); ok { | ||
r1 = rf(ctx, txHash) | ||
} else { | ||
r1 = ret.Error(1) | ||
} | ||
|
||
return r0, r1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters