diff options
-rw-r--r-- | build/ci.go | 2 | ||||
-rw-r--r-- | core/block_validator.go | 3 | ||||
-rw-r--r-- | core/evm.go | 7 | ||||
-rw-r--r-- | params/config.go | 4 | ||||
-rw-r--r-- | test/genesis.json | 4 | ||||
-rwxr-xr-x | test/run_test.sh | 4 | ||||
m--------- | tests/testdata | 0 |
7 files changed, 15 insertions, 9 deletions
diff --git a/build/ci.go b/build/ci.go index ea9fddd03..f8b2253bb 100644 --- a/build/ci.go +++ b/build/ci.go @@ -336,7 +336,7 @@ func doTest(cmdline []string) { packageForLegacyEvm := []string{} for i := 0; i < len(packages); i++ { - if strings.HasSuffix(packages[i], "dexon/tests") { + if strings.HasSuffix(packages[i], "go-tangerine/tests") { packageForLegacyEvm = append(packageForLegacyEvm, packages[i]) packages = append(packages[:i], packages[i+1:]...) i-- diff --git a/core/block_validator.go b/core/block_validator.go index 1bb6aafa2..b91981e33 100644 --- a/core/block_validator.go +++ b/core/block_validator.go @@ -111,8 +111,7 @@ func (v *BlockValidator) ValidateWitnessData(height uint64, blockHash common.Has } if b.Hash() != blockHash { - log.Error("invalid witness block %s vs %s", - b.Hash().String(), blockHash.String()) + log.Error("invalid witness block", "first", b.Hash().String(), "second", blockHash.String()) return consensus.ErrWitnessMismatch } return nil diff --git a/core/evm.go b/core/evm.go index 3a0c0e7f8..822859572 100644 --- a/core/evm.go +++ b/core/evm.go @@ -55,6 +55,11 @@ func NewEVMContext(msg Message, header *types.Header, chain ChainContext, author beneficiary = *author } + ts := header.Time + if !*legacyEvm { + ts /= 1000 + } + return vm.Context{ CanTransfer: CanTransfer, Transfer: Transfer, @@ -64,7 +69,7 @@ func NewEVMContext(msg Message, header *types.Header, chain ChainContext, author Origin: msg.From(), Coinbase: beneficiary, BlockNumber: new(big.Int).Set(header.Number), - Time: new(big.Int).SetUint64(header.Time / 1000), // seconds. + Time: new(big.Int).SetUint64(ts), Randomness: header.Randomness, Difficulty: new(big.Int).Set(header.Difficulty), Round: new(big.Int).SetUint64(header.Round), diff --git a/params/config.go b/params/config.go index 16e1ec813..a8a3a841e 100644 --- a/params/config.go +++ b/params/config.go @@ -175,7 +175,8 @@ var ( EIP155Block: big.NewInt(2675000), EIP158Block: big.NewInt(2675000), ByzantiumBlock: big.NewInt(4370000), - ConstantinopleBlock: nil, + ConstantinopleBlock: big.NewInt(7280000), + PetersburgBlock: big.NewInt(7280000), Ethash: new(EthashConfig), } @@ -192,6 +193,7 @@ var ( EIP158Block: big.NewInt(10), ByzantiumBlock: big.NewInt(1700000), ConstantinopleBlock: big.NewInt(4230000), + PetersburgBlock: big.NewInt(4939394), Ethash: new(EthashConfig), } ) diff --git a/test/genesis.json b/test/genesis.json index a4d421bc0..daf252999 100644 --- a/test/genesis.json +++ b/test/genesis.json @@ -1,7 +1,7 @@ { "config": { "chainId": 411, - "dMoment": 0, + "dMoment": 1570072825, "homesteadBlock": 0, "daoForkBlock": 0, "daoForkSupport": true, @@ -37,7 +37,7 @@ ] }, "recovery": { - "contract": "0x0546d67343df7c68ea3b387de4b35e676e734e4d", + "contract": "0x2Fc9806dDad6044C8158bA31D08b7d9495474A89", "timeout": 30, "confirmation": 1 } diff --git a/test/run_test.sh b/test/run_test.sh index 181f8b755..02129050f 100755 --- a/test/run_test.sh +++ b/test/run_test.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd "$(dirname "$0")" @@ -104,7 +104,7 @@ for i in $(seq 0 $(($NUM_NODES - 1))); do $GDEX \ ${BOOTNODE_FLAGS} \ --bp \ - --verbosity=4 \ + --verbosity=3 \ --nat=none \ --gcmode=archive \ --datadir=$datadir --nodekey=keystore/test$i.key \ diff --git a/tests/testdata b/tests/testdata -Subproject f00f058a9518e908ebb6d577a7a875198c0a37c +Subproject 6b85703b568f4456582a00665d8a3e5c3b20b48 |