mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
core/types: test receipt.logs marshal with time
Signed-off-by: tmelhao <tmelhao@gmail.com>
This commit is contained in:
parent
aca0eb5c54
commit
728c381ade
1 changed files with 25 additions and 20 deletions
|
|
@ -170,6 +170,7 @@ var (
|
||||||
TxIndex: 0,
|
TxIndex: 0,
|
||||||
BlockHash: blockHash,
|
BlockHash: blockHash,
|
||||||
Index: 0,
|
Index: 0,
|
||||||
|
BlockTimestamp: blockTime,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Address: common.BytesToAddress([]byte{0x01, 0x11}),
|
Address: common.BytesToAddress([]byte{0x01, 0x11}),
|
||||||
|
|
@ -180,6 +181,7 @@ var (
|
||||||
TxIndex: 0,
|
TxIndex: 0,
|
||||||
BlockHash: blockHash,
|
BlockHash: blockHash,
|
||||||
Index: 1,
|
Index: 1,
|
||||||
|
BlockTimestamp: blockTime,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// derived fields:
|
// derived fields:
|
||||||
|
|
@ -204,6 +206,7 @@ var (
|
||||||
TxIndex: 1,
|
TxIndex: 1,
|
||||||
BlockHash: blockHash,
|
BlockHash: blockHash,
|
||||||
Index: 2,
|
Index: 2,
|
||||||
|
BlockTimestamp: blockTime,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Address: common.BytesToAddress([]byte{0x02, 0x22}),
|
Address: common.BytesToAddress([]byte{0x02, 0x22}),
|
||||||
|
|
@ -214,6 +217,7 @@ var (
|
||||||
TxIndex: 1,
|
TxIndex: 1,
|
||||||
BlockHash: blockHash,
|
BlockHash: blockHash,
|
||||||
Index: 3,
|
Index: 3,
|
||||||
|
BlockTimestamp: blockTime,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// derived fields:
|
// derived fields:
|
||||||
|
|
@ -523,6 +527,7 @@ func clearComputedFieldsOnLogs(logs []*Log) []*Log {
|
||||||
cpy.TxHash = common.Hash{}
|
cpy.TxHash = common.Hash{}
|
||||||
cpy.TxIndex = math.MaxUint32
|
cpy.TxIndex = math.MaxUint32
|
||||||
cpy.Index = math.MaxUint32
|
cpy.Index = math.MaxUint32
|
||||||
|
cpy.BlockTimestamp = math.MaxUint32
|
||||||
l[i] = &cpy
|
l[i] = &cpy
|
||||||
}
|
}
|
||||||
return l
|
return l
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue