diff options
Diffstat (limited to 'eth/helper_test.go')
-rw-r--r-- | eth/helper_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/eth/helper_test.go b/eth/helper_test.go index d5295b398..f23976785 100644 --- a/eth/helper_test.go +++ b/eth/helper_test.go @@ -35,6 +35,7 @@ import ( "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/ethereum/go-ethereum/params" ) var ( @@ -54,10 +55,10 @@ func newTestProtocolManager(fastSync bool, blocks int, generator func(int, *core pow = new(core.FakePow) db, _ = ethdb.NewMemDatabase() genesis = core.WriteGenesisBlockForTesting(db, testBank) - chainConfig = &core.ChainConfig{HomesteadBlock: big.NewInt(0)} // homestead set to 0 because of chain maker + chainConfig = ¶ms.ChainConfig{HomesteadBlock: big.NewInt(0)} // homestead set to 0 because of chain maker blockchain, _ = core.NewBlockChain(db, chainConfig, pow, evmux) ) - chain, _ := core.GenerateChain(nil, genesis, db, blocks, generator) + chain, _ := core.GenerateChain(chainConfig, genesis, db, blocks, generator) if _, err := blockchain.InsertChain(chain); err != nil { panic(err) } @@ -109,7 +110,7 @@ func (p *testTxPool) Pending() map[common.Address]types.Transactions { batches := make(map[common.Address]types.Transactions) for _, tx := range p.pool { - from, _ := tx.From() + from, _ := types.Sender(types.HomesteadSigner{}, tx) batches[from] = append(batches[from], tx) } for _, batch := range batches { @@ -121,7 +122,7 @@ func (p *testTxPool) Pending() map[common.Address]types.Transactions { // newTestTransaction create a new dummy transaction. func newTestTransaction(from *ecdsa.PrivateKey, nonce uint64, datasize int) *types.Transaction { tx := types.NewTransaction(nonce, common.Address{}, big.NewInt(0), big.NewInt(100000), big.NewInt(0), make([]byte, datasize)) - tx, _ = tx.SignECDSA(from) + tx, _ = tx.SignECDSA(types.HomesteadSigner{}, from) return tx } |