fix(integration): resolve test failures and package dependencies
- Fixed duplicate package declarations in arbitrum parser - Resolved missing methods in events parser (ParseTransaction, AddKnownPool) - Fixed logger test assertion failures by updating expected log format - Updated NewPipeline constructor calls to include ethClient parameter - Fixed nil pointer dereference in pipeline processing - Corrected known pool mappings for protocol identification - Removed duplicate entries in parser initialization - Added proper error handling and validation in parsers These changes resolve the build failures and integration test crashes that were preventing proper testing of the MEV bot functionality. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -93,7 +93,7 @@ func createValidExactInputSingleData() []byte {
|
||||
}
|
||||
|
||||
func TestL2MessageParser_ParseL2Message(t *testing.T) {
|
||||
logger := &logger.Logger{}
|
||||
logger := logger.New("info", "text", "")
|
||||
parser := NewL2MessageParser(logger)
|
||||
|
||||
tests := []struct {
|
||||
@@ -163,7 +163,7 @@ func TestL2MessageParser_ParseL2Message(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestL2MessageParser_ParseDEXInteraction(t *testing.T) {
|
||||
logger := &logger.Logger{}
|
||||
logger := logger.New("info", "text", "")
|
||||
parser := NewL2MessageParser(logger)
|
||||
|
||||
// Create a mock transaction for testing
|
||||
@@ -243,7 +243,7 @@ func TestL2MessageParser_ParseDEXInteraction(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestL2MessageParser_IsSignificantSwap(t *testing.T) {
|
||||
logger := &logger.Logger{}
|
||||
logger := logger.New("info", "text", "")
|
||||
parser := NewL2MessageParser(logger)
|
||||
|
||||
tests := []struct {
|
||||
@@ -295,7 +295,7 @@ func TestL2MessageParser_IsSignificantSwap(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestL2MessageParser_ParseExactInputSingle(t *testing.T) {
|
||||
logger := &logger.Logger{}
|
||||
logger := logger.New("info", "text", "")
|
||||
parser := NewL2MessageParser(logger)
|
||||
|
||||
// Create test data for exactInputSingle call
|
||||
@@ -331,7 +331,7 @@ func TestL2MessageParser_ParseExactInputSingle(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestL2MessageParser_InitialSetup(t *testing.T) {
|
||||
logger := &logger.Logger{}
|
||||
logger := logger.New("info", "text", "")
|
||||
parser := NewL2MessageParser(logger)
|
||||
|
||||
// Test that we can add and identify known pools
|
||||
@@ -345,7 +345,7 @@ func TestL2MessageParser_InitialSetup(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkL2MessageParser_ParseL2Message(b *testing.B) {
|
||||
logger := &logger.Logger{}
|
||||
logger := logger.New("info", "text", "")
|
||||
parser := NewL2MessageParser(logger)
|
||||
|
||||
// Create test message data
|
||||
@@ -363,7 +363,7 @@ func BenchmarkL2MessageParser_ParseL2Message(b *testing.B) {
|
||||
}
|
||||
|
||||
func BenchmarkL2MessageParser_ParseDEXInteraction(b *testing.B) {
|
||||
logger := &logger.Logger{}
|
||||
logger := logger.New("info", "text", "")
|
||||
parser := NewL2MessageParser(logger)
|
||||
|
||||
// Create mock transaction
|
||||
|
||||
Reference in New Issue
Block a user