test version rebased off upstream
This commit is contained in:
parent
1fa7d1736d
commit
ce19466f47
@ -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)
|
||||||
|
@ -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"
|
||||||
|
@ -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"
|
||||||
|
@ -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"
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import(
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user