core/types: test receipt.logs marshal with time

Signed-off-by: tmelhao <tmelhao@gmail.com>
This commit is contained in:
tmelhao 2024-06-03 10:03:53 +00:00
parent aca0eb5c54
commit 728c381ade

View file

@ -170,6 +170,7 @@ var (
TxIndex: 0,
BlockHash: blockHash,
Index: 0,
BlockTimestamp: blockTime,
},
{
Address: common.BytesToAddress([]byte{0x01, 0x11}),
@ -180,6 +181,7 @@ var (
TxIndex: 0,
BlockHash: blockHash,
Index: 1,
BlockTimestamp: blockTime,
},
},
// derived fields:
@ -204,6 +206,7 @@ var (
TxIndex: 1,
BlockHash: blockHash,
Index: 2,
BlockTimestamp: blockTime,
},
{
Address: common.BytesToAddress([]byte{0x02, 0x22}),
@ -214,6 +217,7 @@ var (
TxIndex: 1,
BlockHash: blockHash,
Index: 3,
BlockTimestamp: blockTime,
},
},
// derived fields:
@ -523,6 +527,7 @@ func clearComputedFieldsOnLogs(logs []*Log) []*Log {
cpy.TxHash = common.Hash{}
cpy.TxIndex = math.MaxUint32
cpy.Index = math.MaxUint32
cpy.BlockTimestamp = math.MaxUint32
l[i] = &cpy
}
return l