aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/evm.go2
-rw-r--r--core/vm/oracle_contracts_test.go2
-rw-r--r--params/config.go4
3 files changed, 4 insertions, 4 deletions
diff --git a/core/evm.go b/core/evm.go
index fcc3cd93e..3a0c0e7f8 100644
--- a/core/evm.go
+++ b/core/evm.go
@@ -64,7 +64,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),
+ Time: new(big.Int).SetUint64(header.Time / 1000), // seconds.
Randomness: header.Randomness,
Difficulty: new(big.Int).Set(header.Difficulty),
Round: new(big.Int).SetUint64(header.Round),
diff --git a/core/vm/oracle_contracts_test.go b/core/vm/oracle_contracts_test.go
index 7c892ac10..33fdba886 100644
--- a/core/vm/oracle_contracts_test.go
+++ b/core/vm/oracle_contracts_test.go
@@ -182,7 +182,7 @@ func (g *OracleContractsTestSuite) SetupTest() {
g.s = &GovernanceState{stateDB}
config := params.TestnetChainConfig.Dexcon
- config.LockupPeriod = 1000
+ config.LockupPeriod = 1
config.NextHalvingSupply = new(big.Int).Mul(big.NewInt(1e18), big.NewInt(2.5e9))
config.LastHalvedAmount = new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1.5e9))
config.MiningVelocity = 0.1875
diff --git a/params/config.go b/params/config.go
index b0ed002ee..a7394fd0d 100644
--- a/params/config.go
+++ b/params/config.go
@@ -56,7 +56,7 @@ var (
GenesisCRSText: "In DEXON, we trust.",
Owner: common.HexToAddress("0x2D9f82B399113De36c718BEf361528a856208057"),
MinStake: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e6)),
- LockupPeriod: 86400 * 1000,
+ LockupPeriod: 86400,
MiningVelocity: 0.1875,
NextHalvingSupply: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(2.5e9)),
LastHalvedAmount: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1.5e9)),
@@ -100,7 +100,7 @@ var (
GenesisCRSText: "OOOOoooooooooooooooooooooooooooo",
Owner: common.HexToAddress("0x0D54AF942d6bF13870F5CA65D470954f21D3cBE5"),
MinStake: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e6)),
- LockupPeriod: 86400 * 1000,
+ LockupPeriod: 86400,
MiningVelocity: 0.1875,
NextHalvingSupply: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(2.5e9)),
LastHalvedAmount: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1.5e9)),