-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'v0.3.5' into merge/bor-v0.3.5
Also updated some imports to conform with utils v0.0.24. Added blockchain_hooks_test.go from main project. Tests failing in cmd/geth/
- Loading branch information
Showing
14 changed files
with
206 additions
and
37 deletions.
There are no files selected for viewing
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,29 @@ | ||
package core | ||
|
||
import ( | ||
"testing" | ||
"math/big" | ||
"github.com/ethereum/go-ethereum/plugins" | ||
"github.com/openrelayxyz/plugeth-utils/core" | ||
) | ||
|
||
func TestReorgLongHeadersHook(t *testing.T) { | ||
invoked := false | ||
done := plugins.HookTester("NewHead", func(b []byte, h core.Hash, logs [][]byte, td *big.Int) { | ||
invoked = true | ||
if b == nil { | ||
t.Errorf("Expected block to be non-nil") | ||
} | ||
if h == (core.Hash{}) { | ||
t.Errorf("Expected hash to be non-empty") | ||
} | ||
if len(logs) > 0 { | ||
t.Errorf("Expected some logs") | ||
} | ||
}) | ||
defer done() | ||
testReorgLong(t, true) | ||
if !invoked { | ||
t.Errorf("Expected plugin invocation") | ||
} | ||
} |
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
Oops, something went wrong.