mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
Test blockTimestamp
This commit is contained in:
parent
189e24fd95
commit
d8a1cd3e47
1 changed files with 17 additions and 13 deletions
|
|
@ -1327,10 +1327,11 @@ func TestSimulateV1(t *testing.T) {
|
||||||
validation = true
|
validation = true
|
||||||
)
|
)
|
||||||
type log struct {
|
type log struct {
|
||||||
Address common.Address `json:"address"`
|
Address common.Address `json:"address"`
|
||||||
Topics []common.Hash `json:"topics"`
|
Topics []common.Hash `json:"topics"`
|
||||||
Data hexutil.Bytes `json:"data"`
|
Data hexutil.Bytes `json:"data"`
|
||||||
BlockNumber hexutil.Uint64 `json:"blockNumber"`
|
BlockNumber hexutil.Uint64 `json:"blockNumber"`
|
||||||
|
BlockTimestamp hexutil.Uint64 `json:"blockTimestamp"`
|
||||||
// Skip txHash
|
// Skip txHash
|
||||||
//TxHash common.Hash `json:"transactionHash" gencodec:"required"`
|
//TxHash common.Hash `json:"transactionHash" gencodec:"required"`
|
||||||
TxIndex hexutil.Uint `json:"transactionIndex"`
|
TxIndex hexutil.Uint `json:"transactionIndex"`
|
||||||
|
|
@ -1677,10 +1678,11 @@ func TestSimulateV1(t *testing.T) {
|
||||||
Calls: []callRes{{
|
Calls: []callRes{{
|
||||||
ReturnValue: "0x",
|
ReturnValue: "0x",
|
||||||
Logs: []log{{
|
Logs: []log{{
|
||||||
Address: randomAccounts[2].addr,
|
Address: randomAccounts[2].addr,
|
||||||
Topics: []common.Hash{common.HexToHash("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},
|
Topics: []common.Hash{common.HexToHash("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},
|
||||||
BlockNumber: hexutil.Uint64(11),
|
BlockNumber: hexutil.Uint64(11),
|
||||||
Data: hexutil.Bytes{},
|
BlockTimestamp: hexutil.Uint64(0x70),
|
||||||
|
Data: hexutil.Bytes{},
|
||||||
}},
|
}},
|
||||||
GasUsed: "0x5508",
|
GasUsed: "0x5508",
|
||||||
Status: "0x1",
|
Status: "0x1",
|
||||||
|
|
@ -1853,8 +1855,9 @@ func TestSimulateV1(t *testing.T) {
|
||||||
addressToHash(accounts[0].addr),
|
addressToHash(accounts[0].addr),
|
||||||
addressToHash(randomAccounts[0].addr),
|
addressToHash(randomAccounts[0].addr),
|
||||||
},
|
},
|
||||||
Data: hexutil.Bytes(common.BigToHash(big.NewInt(50)).Bytes()),
|
Data: hexutil.Bytes(common.BigToHash(big.NewInt(50)).Bytes()),
|
||||||
BlockNumber: hexutil.Uint64(11),
|
BlockNumber: hexutil.Uint64(11),
|
||||||
|
BlockTimestamp: hexutil.Uint64(0x70),
|
||||||
}, {
|
}, {
|
||||||
Address: transferAddress,
|
Address: transferAddress,
|
||||||
Topics: []common.Hash{
|
Topics: []common.Hash{
|
||||||
|
|
@ -1862,9 +1865,10 @@ func TestSimulateV1(t *testing.T) {
|
||||||
addressToHash(randomAccounts[0].addr),
|
addressToHash(randomAccounts[0].addr),
|
||||||
addressToHash(fixedAccount.addr),
|
addressToHash(fixedAccount.addr),
|
||||||
},
|
},
|
||||||
Data: hexutil.Bytes(common.BigToHash(big.NewInt(100)).Bytes()),
|
Data: hexutil.Bytes(common.BigToHash(big.NewInt(100)).Bytes()),
|
||||||
BlockNumber: hexutil.Uint64(11),
|
BlockNumber: hexutil.Uint64(11),
|
||||||
Index: hexutil.Uint(1),
|
BlockTimestamp: hexutil.Uint64(0x70),
|
||||||
|
Index: hexutil.Uint(1),
|
||||||
}},
|
}},
|
||||||
Status: "0x1",
|
Status: "0x1",
|
||||||
}},
|
}},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue