test version rebased off upstream

This commit is contained in:
jonathan@vulcanize.io 2024-03-14 02:06:26 +00:00
parent 1fa7d1736d
commit ce19466f47
6 changed files with 17 additions and 16 deletions

View File

@ -132,14 +132,14 @@ func startGethWithIpc(t *testing.T, name string, args ...string) *gethrpc {
return nil return nil
} }
func initGeth(t *testing.T) string { // func initGeth(t *testing.T) string {
args := []string{"--networkid=42", "init", "./testdata/clique.json"} // args := []string{"--networkid=42", "init", "./testdata/clique.json"}
t.Logf("Initializing geth: %v ", args) // t.Logf("Initializing geth: %v ", args)
g := runGeth(t, args...) // g := runGeth(t, args...)
datadir := g.Datadir // datadir := g.Datadir
g.WaitExit() // g.WaitExit()
return datadir // return datadir
} // }
func startLightServer(t *testing.T) *gethrpc { func startLightServer(t *testing.T) *gethrpc {
datadir := initGeth(t) datadir := initGeth(t)

View File

@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>. // along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
package main package geth
import ( import (
"bufio" "bufio"

View File

@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>. // along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
package main package geth
import ( import (
"errors" "errors"

View File

@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>. // along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
package main package geth
import "github.com/urfave/cli/v2" import "github.com/urfave/cli/v2"

View File

@ -15,7 +15,7 @@
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>. // along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
// geth is the official command-line client for Ethereum. // geth is the official command-line client for Ethereum.
package main package geth
import ( import (
"fmt" "fmt"

View File

@ -6,10 +6,9 @@ import(
"github.com/openrelayxyz/plugeth-utils/core" "github.com/openrelayxyz/plugeth-utils/core"
"github.com/openrelayxyz/plugeth-utils/restricted" "github.com/openrelayxyz/plugeth-utils/restricted"
"github.com/openrelayxyz/plugeth-utils/restricted/types"
"github.com/openrelayxyz/plugeth-utils/restricted/hasher"
"github.com/openrelayxyz/plugeth-utils/restricted/consensus" "github.com/openrelayxyz/plugeth-utils/restricted/consensus"
"github.com/openrelayxyz/plugeth-utils/restricted/params" "github.com/openrelayxyz/plugeth-utils/restricted/params"
"github.com/openrelayxyz/plugeth-utils/restricted/types"
) )
var ( var (
@ -78,7 +77,9 @@ func (e *engine) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *
} }
header.Root = state.IntermediateRoot(false) header.Root = state.IntermediateRoot(false)
hasher := hasher.NewStackTrie(nil)
//hasher := hasher.NewStackTrie(nil)
hasher := types.TrieHasher(nil)
block := types.NewBlockWithWithdrawals(header, txs, uncles, receipts, withdrawals, hasher) block := types.NewBlockWithWithdrawals(header, txs, uncles, receipts, withdrawals, hasher)
return block, nil return block, nil