package testutils
import (
"math/big"
"testing"
)
func BigEqual(a, b *big.Int) bool {
if a == nil || b == nil {
return a == b
} else {
return a.Cmp(b) == 0
}
}
func RequireBigEqual(t *testing.T, exp, actual *big.Int) {
if !BigEqual(exp, actual) {
t.Fatalf("expected %s to be equal to %s", exp.String(), actual.String())
}
}
-
Matthew Slipper authored
* op-node: ParseWithdrawalInitiated improvements `ParseWithdrawalInitiated` used to pass every log to `abi.EventByID`. Since `abi.EventByID` was bound to the `L2ToL1MessagePasser` contract, any logs on the receipt from a different contract would cause this function to return an error. This breaks support for parsing withdrawal events initiated by the `L2StandardBridge`, since the bridge adds many events of its own. This PR updates `ParseWithdrawalInitiated` to use the hex-encoded withdrawal intiated topic to determine which log messages to use instead. * add extension 1 * Update op-node/withdrawals/utils.go Co-authored-by:
protolambda <proto@protolambda.com> * Update op-node/withdrawals/utils.go Co-authored-by:
protolambda <proto@protolambda.com> * Update op-node/withdrawals/utils.go Co-authored-by:
protolambda <proto@protolambda.com> * add docstring * use shared lib Co-authored-by:
protolambda <proto@protolambda.com> Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
5dadba52